Part Number Hot Search : 
AP150 M25SN 16R900G MA46474 CH483KPT DZC33 HT6751A P6KE20A
Product Description
Full Text Search
 

To Download MT9D131C12STC-DR Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  mt9d131: 1/3.2-inch 2-mp soc digital image sensor features mt9d131_ds rev. j 5/15 en 1 ?semiconductor components industries, llc,2015 1/3.2-inch system-on-a-chip (soc) cmos digital image sensor mt9d131 datasheet, rev. j for the latest mt9d131 data sheet, please visit www.onsemi.com features ? superior low-light performance ? ultra-low-power, cost effective ? internal master clock generated by on-chip phase- locked loop oscillator (pll) ? electronic rolling shutter (ers), progressive scan ? integrated image flow processor (ifp) for single-die camera module ? automatic image correction and enhancement, including lens shading correction ? arbitrary image decimati on with anti-aliasing ? integrated real-time jpeg encoder ? integrated microcontroller for flexibility ? two-wire serial interface providing access to registers and microcontroller memory ? selectable output data format: itu-r bt.601 (ycbcr), 565rgb, 555rgb, 444rgb, jpeg 4:2:2, jpeg 4:2:0, and raw 10-bit ? output fifo for data rate equalization ?programmable i/o slew rate applications ?network security cameras ?eptz cameras ? wireless cameras ? consumer video products ? high resolution security camera table 1: key performance parameters parameter value optical format 1/3.2-inch (4:3) full resolution 1600 x 1200 pixels (uxga) pixel size 2.8 ? m x 2.8 ? m active pixel array area 4.73 mm x 3.52 mm shutter type electronic rolling shutter (ers) maximum frame rate 15 fps at full resolution, 30 fps in preview mode, (800 x 600) maximum data rate/ master clock 80 mp/s 6C80 mhz supply voltage analog 2.5 ? 3.1 v digital 1.7 ? 1.95 v i/o 1.7 ? 3.1 v pll 2.5 ? 3.1 v adc resolution 10-bit, on-die responsivity 1.0 v/lux-sec (550 nm) dynamic range 71 db snr max 42.3 db power consumption 348 mw at 15 fps, full resolution 223 mw at 30 fps, preview mode operating temperature C30c to +70c package 48-pin clcc
mt9d131_ds rev. j 5/15 en 2 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ordering information ordering information table 2: available part numbers part number product description orderable product attribute description mt9d131c12stc-dp 2.0 mp 1/3" soc dry pack with protective film MT9D131C12STC-DR 2.0 mp 1/3" soc dry pack without protective film mt9d131c12stc-tp 2.0 mp 1/3" soc tape & reel with protective film mt9d131d00stck15lc1-305 2.0 mp 1/3" soc die sales, 305 ? m thickness
mt9d131_ds rev. j 5/15 en 3 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor table of contents table of contents features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 ordering information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 list of figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 general description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 feature overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6 typical connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 signal description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 registers and variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .19 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 ifp registers, page 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 ifp registers, page 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 jpeg indirect registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 output format and timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 sensor core. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 feature description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99 start-up and usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 spectral characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 electrical specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 appendix a: two-wire serial register interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 package dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
mt9d131_ds rev. j 5/15 en 4 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor list of figures list of figures figure 1: typical configuration (connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7 figure 2: 48-pin clcc pinout diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 figure 3: block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10 figure 4: color pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 figure 5: jpeg encoder block diag ram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 figure 6: timing of decimated uncompressed output bypassing the fifo . . . . . . . . . . . . . . . . . . . . . . . . . . . . .73 figure 7: timing of uncompressed full frame output or decimated output passing through the fifo . . .73 figure 8: details of uncompressed yuv/rgb output timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 figure 9: example of timing for non- decimated uncompressed output bypass ing output fifo . . . . . . . . .75 figure 10: timing of jpeg compre ssed output in free-running clock mode . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 figure 11: timing of jpeg compressed output in gated clock mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 figure 12: timing of jpeg compressed output in spoof mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 figure 13: sensor core block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80 figure 14: pixel array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 figure 15: pixel color pattern detail (top right corner) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 figure 16: imaging a scene . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82 figure 17: spatial illustration of image readout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 figure 18: pixel data timing example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83 figure 19: row timing and frame_valid/line_valid signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84 figure 20: 6 pixels in normal and column mirror readout modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 figure 21: 6 rows in normal and row mirror readout modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 figure 22: 8 pixels in normal and column skip 2x readout mode s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 figure 23: 16 pixels in normal and column skip 4x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 figure 24: 32 pixels in normal and column skip 8x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91 figure 25: 64 pixels in normal and column skip 16x readout mode s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 figure 26: analog readout channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .96 figure 27: sequencer driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 figure 28: power on/off sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 figure 29: hard standby sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 figure 30: gamma correction curve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 figure 31: contrast ?s? curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 figure 32: tonal mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 figure 33: contrast diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 figure 34: gain vs. exposure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 figure 35: lens correction zones. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 figure 36: typical spectral char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 figure 37: chief ray angle (cra) vs. image height . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 figure 38: optical center offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 figure 39: i/o timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 figure 40: write timing to r0x 09:0?value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 figure 41: read timing from r0x09:0; returned value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 figure 42: write timing to r0x 09:0?value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 figure 43: read timing from r0x09:0; returned value 0x0284 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 figure 44: two-wire serial bus timing parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 figure 45: 48-pin clcc package outline drawing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
mt9d131_ds rev. j 5/15 en 5 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor list of tables list of tables table 1: key performance parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 table 2: available part numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 table 3: signal description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 table 4: sensor core register defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21 table 5: sensor core register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 table 6: ifp registers, page 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 table 7: ifp registers, page 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 table 8: jpeg indirect registers (see regist ers 30 and 31, page 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54 table 9: drivers ids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .56 table 10: driver variables-sequencer driver (id = 1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 table 11: driver variables-auto exposure driver (id = 2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61 table 12: driver variables-auto white balance (id = 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63 table 13: driver variables-flicker detection driver (id = 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66 table 14: driver variables-mode/context driver (id = 7). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68 table 15: driver variables-jpeg driver (id = 9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72 table 16: ycrcb output data ordering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 table 17: rgb ordering in default mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74 table 18: 2-byte rgb format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75 table 19: frame time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 table 20: frame?long integration time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85 table 21: frequency parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88 table 22: skip values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90 table 23: row addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 table 24: column addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92 table 25: minimum horizontal blanking parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .93 table 26: minimum row time parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94 table 27: offset gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 table 28: recommended gain settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98 table 29: output enable control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 table 30: gamma settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 table 31: contrast values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 table 32: ac electrical characte ristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 table 33: dc electrical definitions and char acteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 table 34: absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 table 35: slave address options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 table 36: two-wire serial bus characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
mt9d131_ds rev. j 5/15 en 6 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor general description general description the on semiconductor mt9d131 is a 1/3.2 inch, 2 mp cmos image sensor with an integrated advanced camera system. the camera system features a microcontroller (mcu) and a sophisticated imag e flow processor (ifp) with a real-time jpeg encoder. the microcontroller manages all components of the camera system and sets key opera- tion parameters for the sensor core to opti mize the quality of raw image data entering the ifp. the sensor core consists of an active pixel array of 1668 x 1248 pixels, program- mable timing and control circuitry including a pll, analog signal chain with automatic offset correction and programmable gain, an d two 10-bit a/d converters (adc). the entire system-on-a-chip (soc) has ultra-low power requirements and superior low-light performance that is particularly suit able for surveillance applications. the excellent low-light performance of mt9d131 is one of the hallmarks of on semi- conductor's breakthrough low-noise cmos imaging technology that achieves ccd image quality (based on signal-to-noise ratio and low-light sensitivity) while main- taining the inherent size, cost, power cons umption, and integration advantages of cmos. feature overview the mt9d131 is a color image sensor with a bayer color filter arrangement. its basic characteristics are described in table 1 on page 1. the mt9d131 has an embedded phase-locked l oop oscillator (pll) that can be used with the common wireless system clock. when in use, the pll adjusts the incoming clock frequency, allowing the mt9d131 to run at almost any desired resolution and frame rate. to reduce power consumption, the pll can be bypassed and powered down. low power consumption is a very important re quirement for all components of wireless devices. the mt9d131 has numerous power conserving features, including an ultra low- power standby mode and the ability to indivi dually shut down un used digital blocks. another important consideration for wireless devices is their electromagnetic emission or interference (emi). the mt9d131 has a prog rammable i/o slew rate to minimize its emi and an output fifo to eliminate output data bursts. the advanced ifp and flexible programmability of the mt9d131 provide a variety of ways to enhance and optimize the image se nsor performance. built-in optimization algorithms enable the mt9d131 to operate at factory settings as a fully automatic, highly adaptable camera. however, most of its settings are user-programmable.
mt9d131_ds rev. j 5/15 en 7 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor typical connection typical connection figure 1: typical configuration (connection) note: 1. resistor value 1.5k ?? is recommended, but may be grea ter for slower two-wire speed. 2. test must be connected to digita l ground for normal device operation. 3. see standby hardware configuration on page 109. 4. all power supply pads must be used. v dd v aa 10f 1.5k 1 1.5k 1 standby s data sclk reset# test 2 frame_valid pixclk line_valid d out 0-d out 7 extclk s addr 1k a gnd d gnd v dd q v dd q 4 v dd 4 v dd pll 4 v aa 4 to cmos camera port 3 two-wire serial bus 6 mhz?80 mhz clock vaapix 4 v dd pll
mt9d131_ds rev. j 5/15 en 8 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor signal description signal description note: 1. see standby hardware configuration on page 109. table 3: signal description name type description note extclk input master clock signal (can either drive the on-chip pll or bypass it). reset_bar input master reset signal, active low. standby input controls sensors standby mode. test input reserved for factory test. tie to digital ground during normal operation. sclk input two-wire serial interface clock. s addr input selects device address for the two-wire serial interface. the address is 0x90 when s addr is tied low, 0xba if tied high. see also r0x0d:0[10]. d out 0-d out 7 output eight-bit image data output or most si gnificant bits (msb) of 10-bit sensor bypass mode. 1 frame_valid output identifies rows in the active image. 1 line_valid output identifies lines in the active image. 1 pixclk output pixel clock. to be used for sampling d out , frame_valid, and line_valid. 1 s data i/o two-wire serial interface data. v dd supply digital power (1.8v). v dd pll supply pll power (2.8v). v aa supply analog power (2.8v). vaapix supply pixel array power (2.8v). v dd q supply i/o power (nominal 1.8v or 2.8v). a gnd supply analog ground. d gnd supply digital, i/o, and pll ground.
mt9d131_ds rev. j 5/15 en 9 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor signal description figure 2: 48-pin clcc pinout diagram 1 2 3 4 5 6 44 43 19 20 21 22 23 24 25 26 27 28 29 30 7 8 9 10 11 12 13 14 15 16 17 18 42 41 40 39 38 37 36 35 34 33 32 31 d gnd d out 7 d out 6 d out 5 d out 4 v dd d gnd d out 3 d out 2 d out 1 d out 0 d gnd d gnd vddpll extclk reset# standby d gnd v dd saddr sclk v aa v aa a gnd d gnd test v dd q v dd q d gnd v dd v dd vaapix vaapix d gnd a gnd a gnd d gnd vdd q d gnd v dd v dd frame_valid line_valid pixclk s data d gnd v dd q d gnd 48 47 46 45
mt9d131_ds rev. j 5/15 en 10 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview architecture overview figure 3: block diagram sensor core the mt9d131 sensor core is based on on semiconductor?s mt9d011, a stand-alone, 2- megapixel cmos image sensor with a 2.8m pixel size. both image sensors have the same optical size (1/3.2 in ches) and maximum resolution (uxga). like the mt9d011, the mt9d131 sensor core includes a phase-lo cked loop oscillator (pll), to facilitate camera integration and minimize the system co st for surveillance applications. when in use, the pll generates internal master clock signal whose frequency can be set higher than the frequency of external clock signal extclk. this allows the mt9d131 to run at any desired resolution and frame rate up to the specified maximum values, irrespective of the extclk frequency. interpolation line buffers other jpeg memories jpeg line buffers decimator line buffers sensor core color pipeline jpeg rom micro- controller sram f i f o stats engine pll internal register bus image flow processor
mt9d131_ds rev. j 5/15 en 11 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview color pipeline figure 4: color pipeline test pattern during normal operation of mt9d131, a stream of raw image data from the sensor core is continuously fed into the color pipeline. fo r test purposes, this st ream can be replaced with a fixed image generated by a special test module in the pipeline. the module provides a selection of test patterns sufficient for basic testing of the pipeline. test pattern line buffers lens shading correction with digital gain digital gain defect correction black level subtraction interpolation and edge detection decimator yuv processing gamma correction yuv-to-rgb/yuv conversion ccm and aperture correction format output ae statistics measurement engine data, sync in data, sync out
mt9d131_ds rev. j 5/15 en 12 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview black level conditioni ng and digital gain image stream processing starts with black level conditioning and multiplication of all pixel values by a programmable digital gain. lens shading correction inexpensive lenses tend to produce images whose brightness is significantly attenuated near the edges. chromatic aberration in such lenses can cause color variation across the field of view. there are also other factors causing fixed-pattern signal gradients in images captured by image sensors. the cumulative result of all these factors is known as lens shading. the mt9d131 has an embedded lens shading correction (lc) module that can be programmed to precisely counter the shading effect of a lens on each rgb color signal. the lc module multiplies rgb signals by a two-dimensional correction function f(x,y), whose profile in both x and y direction is a piecewise quadratic polynomial with coefficients independently programmable for each direction and color. line buffers several data processing steps following the lens shading correction require access to pixel values from up to 8 consecutive image lines. for these lines to be simultaneously available for processing, they must be buffered. the ifp includes a number of sram line buffers that are used to perform defect co rrection, color interpolation, image decima- tion, and jpeg encoding. defect correction the ifp performs on-the-fly defect correction that can mask pixel array defects such as high-dark-current (?hot?) pixels and pixels th at are darker or brighter than their neigh- bors due to photoresponse nonuniformity. the defect correction algorithm uses several pixel features to distinguish between normal and defective pixels. after identifying the latter, it replaces their actual values with values inferred from the values of nearest same- color neighbors. color interpolation and edge detection in the raw data stream fed by the sensor core to the ifp, each pixel is represented by a 10- bit integer number, which, to make things si mple, can be considered proportional to the pixel?s response to a one-color light stimulus, red, green or blue, depending on the pixel?s position under the color filter array. initial da ta processing steps, up to and including the defect correction, preserve the one-color-per- pixel nature of the data stream, but after the defect correction it must be converted to a three-colors-per-pixel stream appro- priate for standard color processing. the conversion is done by an edge-sensitive color interpolation module. the module pads the incomplete color information available for each pixel with information extracted from an appropriate set of neighboring pixels. the algorithm used to select this set and ex tract the information seeks the best compro- mise between maintaining the sharpness of the image and filtering out high-frequency noise. the simplest interpolation algorithm is to sort the nearest eight neighbors of every pixel into three sets?red, green, and blue: discard the set of pixels of the same color as the center pixel (if there are any): calculate average pixel values for the remaining two sets, and use the averages instead of the missing color data for the center pixel. such averaging reduces high-frequency noise, but it also blurs and distorts sharp transitions (edges) in the image. to avoi d this problem, the interpolation module performs edge detection in the neighborhood of every processed pixel and, depending
mt9d131_ds rev. j 5/15 en 13 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview on its results, extracts color information from neighboring pixels in a number of different ways. in effect, it does low-pass fi ltering in flat-field image areas and avoids doing it near edges. color correction and aperture correction to achieve good color fidelity of ifp output, interpolated rgb values of all pixels are subjected to color correction. the ifp multiplies each vector of three pixel colors by a 3 x 3 color correction matrix. the three components of the resulting color vector are all sums of three 10-bit numbers. since such sums can have up to 12 significant bits, the bit width of the image data stream is widened to 12 bits per color (36 bits per pixel). the color correction matrix can be either programmed by the user or automatically selected by the auto white balance (awb) algorithm implemented in the ifp. color correction should ideally produce output colors that ar e independent of the spectral sensitivity and color cross-talk characteristics of the image sensor. the optimal values of color correc- tion matrix elements depend on those sens or characteristics and on the spectrum of light incident on the sensor. to increase image sharpness, a programmable aperture correction is applied to color corrected image data, equally to each of the 12-bit r, g, and b color channels. gamma correction like the aperture correction, gamma correction is applied equally to each of the 12-bit r, g, and b color channels. gamma correction curve is implemented as a piecewise linear function with 19 knee points, taking 12 -bit arguments and ma pping them to 8-bit output. the abscissas of the knee points are fixed at 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. the 8-bit ordinates are programmable through ifp registers or public variables of mode driver (id = 7). the driver variables include two arrays of knee point ordinates defining two separate gamma curves for sensor operation contexts a and b. yuv processing after the gamma correction, the image data stream undergoes rgb to yuv conversion and, optionally, further corrective processing. the first step in this processing is removal of highlight coloration, also referred to as ?col or kill.? it affects only pixels whose bright- ness exceeds a certain preprogrammed threshold. the u and v values of those pixels are attenuated proportionally to the difference between their brightness and the threshold. the second optional processing step is no ise suppression by one-dimensional low-pass filtering of y and/or uv signals. a 3- or 5- tap filter can be selected for each signal. image cropping and decimation to ensure that the size of images output by mt9d131 can be tailored to the needs of all users, the ifp includes a decimator module. when enabled, this mo dule performs ?deci- mation? of incoming images (shrinks them to arbitrarily selected width and height without reducing the field of view and with out discarding any pixel values). the latter point merits underscoring, because the terms ?decimator? and ?image decimation? suggest image size reduction by deleting columns and/or rows at regular intervals. despite the terminology, no such deletions ta ke place in the decimator module. instead, it performs ?pixel binning?? divides each input image into rectangular bins corre- sponding to individual pixels of the desired output image, averages pixel values in these bins and assembles the output image from the bin averages. pixels lying on bin bound- aries contribute to more than one bin averag e: their values are added to bin-wide sums
mt9d131_ds rev. j 5/15 en 14 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview of pixel values with fractional weights. the entire procedure preserves all image infor- mation that can be included in the down sized output image and filters out high- frequency features that could cause aliasing. the image decimation in the ifp can be preceded by image cropping and/or image deci- mation in the sensor core. image cropping takes place when the sensor core is programmed to output pixel values from a rectangular portion of its pixel array - a window - smaller than the default 1600 x 1200 window. pixels outside the selected crop- ping window are not read out, which results in narrower field of view than at the default sensor settings. irrespective of the size and position of the cropping window, the mt9d131 sensor core can also decimate outg oing images by skipping columns and/or rows of the pixel array, and/or by binning 2 x 2 groups of pixels of the same color. because decimation by skippi ng (that is, deletion) can ca use aliasing (even if pixel binning is simultaneously enabled), it is generally better to change image size only by cropping and pixel binning. the image cropping and decimator module can be used to do digital zoom and pan. if the decimator is programmed to output imag es smaller than images coming from the sensor core, zoom effect can be produced by cropping the latter from their maximum size down to the size of the output images . the ratio of these two sizes determines the maximum attainable zoom factor. for ex ample, a 1600 x 1200 image rendered on a 160 x 120 display can be zoomed up to 10 ti mes, since 1600/160 = 1200/120 = 10. panning effect can be achieved by fixing the size of the cr opping window and moving it around the pixel array. yuv-to-rgb/yuv conversion and output formatting the yuv data stream emerging from the de cimator module can either exit the color pipeline as-is or be converted before exit to an alternative yuv or rgb data format. see ?color conversion formulas? on page 78 an d the description of register r0x97:1 for more details. jpeg encoder and fifo the jpeg compression engine in the mt9d131 is a highly integrated, high-performance solution that can provide sustained data rate s of almost 80 mb/s for image sizes up to 1600 x 1200. additionally, the solution provid es for low power consumption and full programmability of jpeg compression parameters for image quality control. the jpeg encoding block is designed for continuous image flow and is ideal for low-power applications. after initial configuration for a target application, it can be controlled easily for instantaneous stop/res tart. a flexible configuration and control interface allows for full programmability of various jpeg-specific parameters and tables.
mt9d131_ds rev. j 5/15 en 15 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview jpeg encoding highlights 1. sequential dct (baseline) is o/iec 10918-1 jpeg-compliant 2. ycbcr 4:2:2 format compression 3. programmable quantization tables ? one each for luminance and chrominance (active) ? support for three pairs of quantization tables?two pairs serve as a backup for buffer overflow 4. programmable huffman tables ? 2 ac, 2 dc tables?separate for luminance and chrominance 5. quality/compression ratio control capability 6. 15 fps mjpeg capability (header processing in external host processor) figure 5: jpeg encoder block diagram re-order line buffers (8y + 8c) output buffer 800 x 16 mux jpeg encoder block regfile 2 x 16 ifp register bus data unpacking data packing spoof-frame timing generator control registers/status pixclk d out 0-d out 7 lv fv re-order buffer controller jpeg input control itu-r bt. 601 interface control buffer control jpeg encoder memories buffer fullness detect ld/unld control adaptive pixclk soc_d out (ycbcr or rgb)
mt9d131_ds rev. j 5/15 en 16 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview output buffer overflow prevention the mt9d131 integrates sram for the stora ge of jpeg data. to prevent output buffer overflow, the mt9d131 implements an adaptive pixel clock (pixclk) rate scheme. when the adaptive pixel clock rate scheme is enabled, pixclk ca n run at clock frequencies of (extclk freq/n1) , (extclk freq/n2) , (extclk freq/n3) , where n1 , n2 , n3 are register values programmed by the host through the tw o-wire serial interface. a clock divider block from the master clock extclk gene rates the three clocks, pclk1, pclk2, and pclk3. at the start of the frame encode, pixclk is sourced by pclk1. the buffer fullness detec- tion block of the soc switches pixclk to pclk2 and then to pclk3, if necessary, based on the watermark at the output buffer (that is, percentage filled up). when the output buffer watermark reaches 50 percent, pixclk switches to pclk2. this increase in pixclk rate unloads the output buffer at a higher rate. however, depending on the image complexity and quantization table se tting, the compressed image data may still be generated by the jpeg encoder faster than pixclk can unload it. should the output buffer watermark equal 75 percent or higher , pixclk is switched to pclk3. when the output buffer watermark drops back to 50 perc ent, pixclk is switched back to pclk2. when the output buffer watermark drops to 25 percent, pixclk is switched to pclk1. when a decision to adapt pixclk frequency is made, line_valid, which qualifies the 8- bit data output (d out ), is de-asserted until pixclk is safely switched to the new clock. line_valid is independent of the horizontal timing of the uncompressed imaged. its assertion is strictly based on co mpressed image data availability. should an output buffer overfl ow still occur with pixclk at the maximum frequency, the output buffer and the small asynchronous fi fo are flushed immediately. this causes line_valid to be de-asserted. frame_valid is also de-asserted. in addition to the adaptive pixclk rate scheme, the mt9d131 also has storage for three sets of quantization tables (six tables). in the event of output buffer overflow during the compression of the current frame, another se t of the preloaded quantization tables can be used for the encoding of the immediate next frame. then, the mt9d131 starts compressing the next frame starting with the nominal pixclk frequency. output interface control (two-wire serial interface) camera control and jpeg configuration/cont rol are accomplished through a two-wire serial interface. the interface supports individu al access to all camera function registers and jpeg control registers. in particular, all tables located in the jpeg quantization and huffman memories are accessible through the tw o-wire interface. to write to a partic- ular register, the external host processor must send the mt9d131 device address (selected by s addr or r0x0d:0[10]), the address of the register, and data to be written to it. see ?appendix a: two-wire serial register in terface? on page 125 for a description of read sequence and for details of the two-wire serial interface protocol. data jpeg data is output in a bt656-like 8-bit parallel bus d out 0?d out 7, with frame_valid, line_valid, and pixclk. jpeg output data is valid when both frame_valid and line_valid are asserted. wh en the jpeg data output for the frame completes, or buffer overflow occurs, line_valid and frame_valid are de-asserted. the output clock runs at frequencies selected by frequency divisors n1, n2, and n3 (registers r0x0e:2 and r0x0f:2), de pending on output buffer fullness.
mt9d131_ds rev. j 5/15 en 17 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview context and operational modes the mt9d131 can operate in several modes, including preview, still capture (snapshot), and video. all modes of operation are individually configurable and are organized as two contexts?context a and context ? b. a context is defined by se nsor image size, frame rate, resolution, and other associated parameters. the user can switch between the two contexts by sending a command through the two-wire serial interface. preview context a is primarily intended for use in th e preview mode. during preview, the sensor usually outputs low resolution images at a relatively high frame rate, and its power consumption is kept to a minimum. context b can be configured for the still capture or video mode, as required by the user. for still capture configuration, the user typically specifies the desired output image size; for jpeg compression, how many frames to capture, and so on. for video, the user migh t select a different im age size and a fixed frame rate. snapshot to take a snapshot, the user must send a command that changes the context from a to context b. typical sequence of events after this command is as follows. first, the camera exposure and white balance adjusts automatically to the changed illumination of the scene. next, the camera enables jpeg compression and captures one or more frames of desired size. once the sequence is comple te, the camera automatically returns to context a and resumes running preview. video to start video capture, the user has to change relevant context b settings, such as capture mode, image size, and frame rate, and again send a context change command. upon receiving the command, the mt9d131 switches to the modified context b settings, while continuing to output yuv-encoded image data. auto expo sure automatically switches to smooth continuous operation. to exit the video capture mode, the user has to send another context change command causing the sensor to switch back to context a. auto exposure the auto exposure (ae) algorithm performs automatic adjustments of the image bright- ness by controlling exposure time and analog gains of the sensor core as well as digital gains applied to the image. two auto exposure algorithm modes are available: 1. preview 2. scene-evaluative auto exposure is implemented by means of a firmware driver that analyzes image statis- tics collected by exposure measurement engine, makes a decision and programs the sensor core and color pipeline to achieve the desired exposure. the measurement engine subdivides the image into 16 windows organized as a 4 x 4 grid. preview mode this exposure mode is activated during preview or video capture. it relies on the expo- sure measurement engine that tracks speed and amplitude of the change of the overall luminance in the selected windows of the image.
mt9d131_ds rev. j 5/15 en 18 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor architecture overview the backlight compensation is achieved by we ighting the luminance in the center of the image higher than the luminance on the periphery. other algorithm features include the rejection of fast fluctuations in illumina tion (time averaging), control of speed of response, and control of the sensitivity to the small changes. while the default settings are adequate in most situations, the user can program target brightness, measurement window, and other parameters described above. scene-evaluative algorithm a scene-evaluative ae algorithm is availabl e for use in snapshot mode. the algorithm performs scene analysis and classification wi th respect to its brightness, contrast, and composure and then decides to increase, decrease, or keep original exposure target. it makes the most difference for backlight and bright outdoor conditions. auto white balance the mt9d131 has a built-in auto white bala nce (awb) algorithm designed to compen- sate for the effects of changing spectra of the scene illumination on the quality of the color rendition. this sophisticated algorith m consists of two major parts: a measure- ment engine performing statis tical analysis of the image and a driver performing the selection of the optimal color correction matr ix, digital, and sensor core analog gains. while default settings of these algorithms are adequate in mo st situations, the user can reprogram base color correction matrices, place limits on color channel gains, and control the speed of both matrix and gain adjustments. unlike simple white balancing algorithms found in many pc cameras, the mt9d131 awb does not require the presence of gray or white elements in the image for good color rendition. the awb does not attempt to locate ?brightest? or ?grayest? element of the image but instead performs sophisticated image an alysis to differentiate between changes in predominant spectra of illumination and changes in predominant co lors of the scene. while defaults are suit- able for most applications, a wide range of algorithm parameters can be overwritten by the user through the serial interface. flicker detection flicker occurs when the integration time is not an integer multiple of the period of the light intensity. the automatic flicker detection block does not compensate for the flicker, but rather avoids it by detecting the flicke r frequency and adjusting the integration time. for integration times below the light intens ity period (10ms for 50hz environment), flicker cannot be avoided.
mt9d131_ds rev. j 5/15 en 19 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers and variables registers and variables three types of configuration controls are available: ? hardware registers ? driver variables ?mcu sram the following convention is used in the text below to designate registers and variables: r0x12:1, r0x12:1[3:0] or r18:1, r18:1[3:0] these refer to two-wire accessible register number 18, or 0x12 hexadecimal, located on page 1. [3:0] indicate bits. registers numbers range from 0 through ff and bits range from 15 through 0. ?ae.target this refers to variable ?target? in the ae driver. ? sram 0x0400 this refers to special function register or sram located at address 0x1080 in mcu memory space. how to access registers, variables are ac cessed in different ways. registers hardware registers are organized into several pages. page 0 contains sensor controls. page 1 contains color pipeline controls. pa ge 2 contains jpeg, output fifo, and more color pipeline controls. the desired page is selected by writing the desired value to r0xf0. after that, all reads and writes to registers from 0 through ff except r0xf0 and r0xf1, are directed to the selected page. r0xf0 and r0xf1 are special registers and are present on all pages. see ?appendix a: two -wire serial register int erface? on page 125 for a description of two-wire register access. variables variables are located in the microcontroller ram memory. each driver, such as auto exposure, white balance, and so on, has a unique driver id (0...31) and a set of public variables organized as a structure. each variab le in this structure is uniquely identified by its offset from the top of the structure and its size. the size can be 1 or 2 bytes, while the offset is 1 byte. all driver variables (public and private) can be accessed through r0xc6:1 and r0xc8:1. while two access modes are available (accessed by physical address and by logical address) the public variables are typically accessed by the logical method. the logical address, which is set in r0c6:1, consists of a 5-bit driver id number and a variable offset. examples are provided below. to set the variable ae.target = 50: ? the variable has a driver id of 2. therefore, set r0xc6:1[12:8] = 2 ? the variable has an offset of 6. therefore, set r0xc6:1[7:0] = 6 ? this is a logical access. therefore, set r0xc6:1[14:13] = 01 ? the size of the variable is 8 bits. therefore, set r0xc6:1[15] = 1 ? by combining these bits, r0xc6:1 = 0xa206. ? set r0xc8:1 = 50 for the value of the variable
mt9d131_ds rev. j 5/15 en 20 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers and variables to read the variable ae.target: ? since this is the same variable as the above example, r0xc6:1 = 0xa206 ? read r0xc8:1 for the current variable value mcu sram consists of 1k system memory and 1k user memory. examples of access: ? write into user sram. use to upload code a. r0xc6:1 = 0x400 // address b. r0xc8:1 = 0x1234 // write 16-bit value ? read from user sram a. r0xc6:1 = 0x400 // address b. read r0xc8:1 // read 16-bit value see r0xc6:1 and r0xc8:1 description in table 7, ?ifp registers, page 2,? on page 43 for more detail.
mt9d131_ds rev. j 5/15 en 21 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers registers sensor core registers table 4: sensor core register defaults register number (hex) register description default pre mcu boot default after mcu boot 0x00 reserved 0x1519 0x1519 0x01 row start 0x001c 0x001c 0x02 column start 0x003c 0x003c 0x03 row width 0x04b0 0x04b0 0x04 col width 0x0640 0x0640 0x05 horizontal blanking b 0x015c 0x0204 0x06 vertical blanking b 0x0020 0x002f 0x07 horizontal blanking a 0x00ae 0x00fe 0x08 vertical blanking a 0x0010 0x000c 0x09 shutter width 0x04d0 n/a 0x0a row speed 0x00011 0x0001 0x0b extra delay 0x0000 0x0000 0x0c shutter delay 0x0000 0x0000 0x0d reset 0x0000 0x0000 0x1f frame valid control 0x0000 0x0000 0x20 read mode b 0x0000 0x0300 0x21 read mode a 0x0490 0x8400 0x22 dark col/rows 0x010f 0x010f 0x23 reserved 0x0608 0x0608 0x24 extra reset 0x8000 0x8000 0x25 line valid control 0x0000 0x0000 0x26 bottom dark rows 0x0007 0x0007 0x2b green gain 0x0020 n/a 0x2c blue gain 0x0020 n/a 0x2d red gain 0x0020 n/a 0x2e green2 gain 0x0020 n/a 0x2f global gain 0x0020 n/a 0x30 row noise 0x042a 0x042a 0x59 black rows 0x00ff 0x00ff 0x5b dark g1 average n/a n/a 0x5c dark b average n/a n/a 0x5d dark r average n/a n/a 0x5e dark g2 average n/a n/a 0x5f calib threshold 0x231d 0x231d 0x60 calib control 0x0080 0x0080 0x61 calib green1 0x0000 0x0000 0x62 calib blue 0x0000 0x0000 0x63 calib red 0x0000 0x0000
mt9d131_ds rev. j 5/15 en 22 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers 0x64 calib green2 0x0000 0x0000 0x65 clock control 0xe000 0xe000 0x66 pll control 1 0x2809 0x1000 0x67 pll control 2 0x0501 0x0500 0xc0 reserved 0x1519 0x1519 0xc1 reserved 0x1519 0x1519 0xc2 reserved 0x1519 0x1519 0xc3 reserved 0x1519 0x1519 0xc4 reserved 0x1519 0x1519 0xc5 reserved 0x1519 0x1519 0xc6 reserved 0x1519 0x1519 0xe0 reserved 0x1519 0x1519 0xe1 reserved 0x1519 0x1519 0xe2 reserved 0x1519 0x1519 0xe3 reserved 0x1519 0x1519 0xf0 page register 0x0000 0x0000 0xf1 bytewise address 0x0000 0x0000 0xf2 context control 0x000b 0x0000 0xff reserved 0x1519 0x1519 table 4: sensor core regi ster defaults (continued) register number (hex) register description default pre mcu boot default after mcu boot
mt9d131_ds rev. j 5/15 en 23 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers registers notation used in the sensor register description table: sync?d to frame start n = no. the register value is updated and used immediately. y = yes. the register value is updated at next frame start as long as the synchronize changes bit is 0. frame start is defined as when the first dark row is read out. by default, this is 8 rows before frame_valid goes high. bad frame a bad frame is a frame where all rows do not have the same integration time, or offsets to the pixel values changed during the frame. n = no. changing the register value does not produce a bad frame. y = yes. changing the register value might produce a bad frame. ym = yes, but the bad frame is masked out unless the ?show bad frames? feature is (r0x0d:0[8]) is enabled. table 5: sensor core register description bit field description default (hex) syncd to frame start bad frame r00x00 - reserved (r/o) bits 15:0 reserved reserved. 1519 r10x01 - row start (r/w) bits 10:0 row start the first row to be read out, excluding any dark rows that may be read. to window the image down, set this register to the starting y value. setting a value less than 20 is not recommended because the dark rows should be read using r0x22:0. 1c y ym r20x02 - column start (r/w) bits 10:0 column start the first column to be read out, excluding dark columns that may be read. to window the image down, set this register to the starting x value. setting a valu e below 52 is not recommended because readout of dark columns should be controlled by r0x22:0. 3c y ym r30x03 - row width (r/w) bits 10:0 row width number of rows in the image to be read out, excluding any dark rows or border rows that may be read. the minimum supported value is 2. 4b0 y ym r40x04 - column width (r/w) bits 10:0 column width number of columns in image to be read out, excluding any dark columns or border columns that may be read. the minimum supported value is 9 in 1 adc mode and 17 in 2 adc mode. 640 y ym r50x05 - horizontal blankingcontext b (r/w) bits 13:0 horizontal blanking context b number of blank columns in a row when context b is selected (r0xf2:0[0] = 1). the extra columns are added at the beginning of a row. see frame rate control on page 93 for more information on suppor ted register values. 15c y ym
mt9d131_ds rev. j 5/15 en 24 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers r60x06 - vertical blan kingcontext b (r/w) bits 14:0 vertical blanking context b number of blank rows in a frame when context b is selected (r0xf2:0[1] = 1). the minimum supported value is (4 + r0x22:0[2:0]). the actual vertical blanking time may be controlled by the shutter width (r0x09:0). see raw data timing on page 83. 20 y n r70x07 - horizontal blankingcontext a (r/w) bits 13:0 horizontal blanking context a number of blank columns in a ro w when context a is selected (r0xf2:0[0] = 0). the extra columns are added at the beginning of a row. see frame rate control on page 93 for more information on suppor ted register values. ae y ym r80x08 - vertical blan kingcontext a (r/w) bits 14:0 vertical blanking context a number of blank rows in a frame when context a is chosen (r0xf2:0[1] = 1). the minimum supported value is (4 + r0x22:0[2:0]). the actual vertical blanking time may be controlled by the shutter width (r0x9:0). see raw data timing on page 83. 10 y n r90x09 - shutter width (r/w) bits 15:0 shutter width integration time in number of rows. the integration time is also influenced by the shutter delay (r0x0c:0) and the overhead time. 4d0 y n r100x0a - row speed (r/w) bits 15:14 reserved do not change from default value. bit 13 reserved do not change from default value. bit 8 invert pixel clock invert pixclk. when clear, frame_valid, line_valid, and d out are set up relative to the delayed rising edge of pixclk. when set, frame_valid, line_valid, and d out are set up relative to the delayed falling edge of pixclk. 0 n n bits 7:4 delay pixel clock number of half master clock cycle increments to delay the rising edge of pixclk relative to transitions on frame_valid, line_valid, and d out . 1 n n bit 3 reserved do not change from default value. bits 2:0 pixel clock speed a programmed value of n gives a pixel clock period of n master clocks in 2 adc mode and 2*n master clocks in 1 adc mode. a value of 0 is treated like (and reads back as) a value of 1. 1 y ym r110x0b - extra delay (r/w) bits 13:0 extra delay extra blanking inserted between frames. a programmed value of n increases the vertical blanking time by n pixel clock periods. can be used to get a more exact frame rate. it may affect the integration times of parts of the image when the integration time is less than one frame. bad frame does not occur unless integration time is less than one frame. 0 y n 1 table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 25 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers r120x0c - shutter delay (r/w) bits 13:0 shutter delay the amount of time from the end of the sampling sequence to the beginning of the pixel reset sequence. if the value in this register exceeds the row time, the reset of the row does not complete before the associated row is sampled, and the sensor does not generate an image. a programmed value of n reduces the integration time by n/2 pixel clock periods in 1 adc mode and by n pixel clock periods in 2 adc mode. 0 y n r130x0d - reset (r/w) bit 15 synchronize changes by default, update of many registers are synchronized to frame start. setting this bit inhibits this update; register changes remain pending until this bit is re turned to 0. when this bit is returned to 0, all pending register updates are made on the next frame start. 0 n n bit 10 toggle s addr by default, the sensor serial bu s responds to addresses 0xba and 0xbb. when this bit is set, the sensor serial bus responds to addresses 0x90 and 0x91. writes to this bit are ignored when standby is asserted. see slave address on page 126. 0 n n bit 9 restart bad frames when set, a restart is forced to take place whenever a bad frame is detected. this can shorten th e delay when waiting for a good frame because the delay, when masking out a bad frame, is the integration time rather than the full frame time. 0 n n bit 8 show bad frames 0: outputs only good frames (default). 1: output all frames (including bad frames). a bad frame is defined as the first frame following a change to: window size or position, horizontal blanking, pixel clock speed, zoom, row or column skip, binning, mirroring, or use of border. 0 n n bit 7:6 inhibit standby / drive pins 00 or 01: setting standby high puts sensor into standby state with high-impedance outputs 10: setting standby high only puts the outputs in high-z 11: causes standby to be ignored 0 n n bit 5 reset soc when this bit is set to 1, soc is put in reset state. it exits this state when the bit is set back to 0. any attempt to access soc registers (ifp pages 1 and 2) in the reset state results in a sensor hang-up. the sensor cannot recover from it without a hard reset or power cycle. 0 n bit 4 output disable setting this bit to 1 puts the pin interface in a high-z. see output enable control on page 109. if the d out *, pixclk, frame_valid, or line_valid are floa ting during standby, this bit should be set to 0 to turn off the input buffer, reducing standby current (see technical note tn0934 standby sequence). this bit must work together with bit 6 to take effect. 0 bit 3 reserved keep at default value. 0 bit 2 standby setting this bit to 1 places the sensor in a low-power state. any attempt to access registers r[0xf7:0 xfd]:0 in this state results in a sensor hang-up. the sensor cannot recover from it without a hard reset or power cycle. 0 n ym table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 26 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bit 1 restart setting this bit to 1 causes the sensor to truncate the current frame and start resetting the first row. the delay before the first valid frame is read out is equal to the integration time. this bit is write - 1 but always reads back as 0. 0 n ym bit 0 reset setting this bit puts the sensor in reset; the frame being generated is truncated and the pin interface goes to an idle state. all internal registers (except for this bit) go to the default power-up state. clearing this bit resumes normal operation. 0 n ym r310x1f - frame_valid control (r/w) bit 15 enable early frame_valid fall 0 : default. frame_valid goes low 6 pixel clocks after last line_valid. 1 : enables the early disabling of fr ame_valid as set in bits 14:8. line_valid is still generated for all active rows. 0 n n bits 14:8 early frame_valid fall when enabled, the frame_valid falling edge occurs within the programmed number of rows before the end of the last line_valid. (1 + bits 14:8)*row time + constant (constant = 3 in default mode) the value of this field must not be larger than row width r0x03:0. 0 n n bit 7 enable early frame_valid rise 0 : default. frame_valid goes high 6 pixel clocks before first line_valid. 1 : enables the early rise of frame_valid as set in bits 6:0. 0 n n bits 6:0 early frame_valid rise when enabled, the frame_valid rising edge is set high the programmed number of rows be fore the first line_valid: (1 + bits 6:0)*row time + horizontal blank + constant (constant = 3 in default mode). 0 n n r320x20 - read modecontext b (r/w) bit 15 binning context b when read mode context b is selected (r0xf2:0[3] = 1): 0 : normal operation. 1 : binning enabled. see binning on page 92 and see frame rate control on page 93 for a full description. 0 y ym bit 13 zoom enable 0: normal operation. 1: zoom is enabled, with zoom factor [zoom] defined in bits 12:11. in zoom mode, the pixel data rate is slowed by a factor of [zoom]. this is achieved by outputting [zoom - 1] blank rows between each output row. setting this mo de allows the user to fill a window that is [zoom] times larger with interpolated data. the pixel clock speed is not affect ed by this operation, and the output data for each pixel is valid for [zoom] pixel clocks. every row is followed by [zoom - 1] blank rows (with their own line_valid, but all data bits = 0) of equal time. the combination of this register and an appropriate change to the window sizing registers allows the user to zoom to a region of interest without affecting the frame rate. 0 y ym table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 27 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bits 12:11 zoom when zoom is enabled by bit 13, this field determines the zoom amount: 00: zoom 2x 01: zoom 4x 10: zoom 8x 11: zoom 16x 0 y ym bit 10 use 1 adc context b when read mode context b is se lected (bit 3, r0xf2:0 = 1): 0: use both adcs to achieve maximum speed. 1: use 1 adc to reduce power. maximum readout frequency is now half the master clock frequency, and the pixel clock is automatically adjusted as described for the pixel clock speed register. 0 y ym bit 9 show border this bit indicates whether to show the border enabled by bit 8. 0: border is enabled but not shown; vertical blanking is increased by 8 rows and horizontal blanking is increased by 8 pixels. 1: border is enabled and shown; frame_valid time is extended by 8 rows and line_valid is extended by 8 pixels. see pixel border on page 89. 0 n n bit 8 over sized 0: normal uxga size. 1: adds a 4-pixel border around the active image array independent of readout mode (skip, zoom, mirror, and so on). setting this bit adds 8 to the number of rows and columns in the frame. 0 y ym bit 7 column skip enable context b when read mode context b is selected (r0xf2:0[3] = 1): 0: normal readout. 1: enable column skip. 0 y ym bits 6:5 column skip context b when read mode context b is selected (r0xf2:0[3] = 1) and column skip is enabled (bit 7 = 1): 00: column skip 2x 01: column skip 4x 10: column skip 8x 11: column skip 16x see column and row skip on page 90 for more information. 0 y ym bit 4 row skip enable context b when read mode context b is selected (r0xf2:0[3] = 1): 0: normal readout. 1: enable row skip. 0 y ym bits 3:2 row skip context b when read mode context b is selected (r0xf2:0[3] = 1) and row skip is enabled (bit 4 = 1): 00: row skip 2x 01: row skip 4x 10: row skip 8x 11: row skip 16x see column and row skip on page 90 for more information. 0 y ym bit 1 mirror columns read out columns from right to le ft (mirrored). when set to 1, column readout starts from column [column start + column size] and continues down to [column start + 1]. when set to 0, readout starts at column start and continues to [column start + column size C 1]. this ensures that the starting color is maintained. 0 y ym table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 28 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bit 0 mirror rows read out rows from bottom to top (upside down). when set, row readout starts from row [row start + row size] and continues down to [row start + 1]. when clear, readout starts at row start and continues to [row start + row size C1]. this ensures that the starting color is maintained. 0 y ym r330x21 - read modecontext a (r/w) bit 15 binning context a when read mode context a is selected (r0xf2:0[3] = 0): 0: normal operation. 1: binning enabled. see binning on page 92. 1 y ym bit 10 use 1 adc context a when read mode context a is selected (r0xf2:0[3] = 0): 0: use both adcs to achieve maximum speed. 1: use one adc to reduce power. maximum readout frequency is now half of the master clock, an d the pixel clock is automatically adjusted as described for th e pixel clock speed register. 1 y ym bit 7 column skip enable context a when read mode context a is selected (r0xf2:0[3] = 0): 0: normal readout. 1: enable column skip. 1 y ym bits 6:5 column skip context a when read mode context a is selected (r0xf2:0[3] = 0) and column skip is enabled (bit 7 = 1): 00: column skip 2x 01: column skip 4x 10: column skip 8x 11: column skip 16x see column and row skip on page 90 for more information. 0 y ym bit 4 row skip enable context a when read mode context a is selected (r0xf2:0[3] = 0): 0: normal readout. 1: enable row skip. 1 y ym bits 3:2 row skip context a when read mode context a is selected (r0xf2:0[3] = 0) and row skip is enabled (bit 4 = 1): 00: row skip 2x 01: row skip 4x 10: row skip 8x 11: row skip 16x see column and row skip on page 90 for more information. 0 y ym r340x22 - show control (r/w) bit 10 number of dark columns the mt9d131 has 40 dark columns. 0: read out 20 dark columns (4C23). 1: read out 36 dark columns (4C39). ignored during binning, where all 40 dark columns are used. 0 n n bit 9 show dark columns when set to 1, the 20 or 36 (dependent on bit 10) dark columns are output before the active pixe ls in a line. there is an idle period of 2 pixels between readout of the dark columns and readout of the active image. therefore, when set to 1, line_valid is asserted 22 pixel times earlier than normal, and the horizontal blanking time is decreased by the same amount. 0 n n table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 29 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bit 8 read dark columns 0: when disabled, an arbitrary number of dark columns can be read out by including them in the active image. enabling the dark columns increases the minimum value for horizontal blanking but does not affect the row time. 1: enables the readout of dark columns for use in the row-wise noise correction algorithm. the number of columns used are 40 in binning mode, and otherwise determined by bit 10. 1 n y bit 7 show dark rows when set to 1, the programmed dark rows is output before the active window. frame_valid is thus asserted earlier than normal. this has no effect on integration time or frame rate. 0 n n bits 6:4 dark start address the start address for the dark rows within the 8 available rows (an offset of 4 is added to compensate for the guard pixels). must be set so all dark rows read out falls in the address space 0:7. 0 n n bit 3 reserved do not change from default value. bits 2:0 num dark rows a value of n causes n + 1 dark rows to be read out at the start of each frame when dark row readout is enabled (bit 3). 7 n y r360x24 - extra reset (r/w) bit 15 extra reset enable 0: only programmed window (set by r0x01:0 through r0x04:0) and black pixels are read. 1: two additional rows are read and reset above and below programmed window to prevent blooming to active area. 1 n n bit 14 next row reset when set, and the integration time is less than one frame time, row n + 1 is reset immediately prio r to resetting row n. this is intended to prevent blooming ac ross rows under conditions of very high illumination. 0 n n bits 13:0 reserved do not change from default value. r370x25 - line_valid control (r/w) bit 15 xor line_valid 0: normal line_valid (default, no xoring of line_valid). ineffective if continuous line_valid is set. 1: line_valid = continuous line_valid xor frame_valid. 0 n n bit 14 continuous line_valid 0: normal line_valid (default, no line_valid during vertical blanking). bad frame 1: continuous line_valid (continue producing line_valid during vertical blanking). 0 n n 2 r380x26 - bottom dark rows (r/w) bit 7 show the bottom dark rows are visible in the image if the bit is set. 0 n n bits 6:4 start address defines the start address within the 8 bottom dark rows. 0 n n bit 3 enable readout enables readout of the bottom dark rows. 0 n y bits 2:0 number of dark rows defines the number of bottom dark rows to be used. (the number of rows used is the specified value + 1.) 7 n y r430x2b - green1 gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 30 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r440x2c - blue gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits [6:0]*0.03125. 20 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n r450x2d - red gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10] + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r460x2e - green2 gain (r/w) bits 11:9 digital gain total gain = (bit 9 + 1)*(bit 10 + 1)*(bit 11 + 1)*analog gain (each bit gives 2x gain). 0 y n bits 8:7 analog gain analog gain = (bit 8 + 1)*(bit 7 + 1)*initial gain (each bit gives 2x gain). 0 y n bits 6:0 initial gain initial gain = bits 6:0*0.03125. 20 y n r470x2f - global gain (r/w) bits 11:0 global gain this register can be used to simultaneously set all 4 gains. when read, it returns the value stored in r0x2b:0. 20 y n r480x30 - row noise (r/w) bit 15 frame-wise digital correction by default, the row noise is calculated and compensated for individually for each color of each row. when this bit is set to 1, the row noise is calculated and ap plied for each color of each of the first two 2 pairs of values an d the same values are applied to each subsequent row, so that new values are calculated and applied once per frame. 0 n n bits 14:12 gain threshold when the upper analog gain bits are equal to or larger than this threshold, the dark column average is used in the row noise correction algorithm. otherwise, the subtracted value is determined by bit 11. this check is independently performed for each color, and is a means to turn off the black level algorithm for lower gains. 0 n n bit 11 use black level average 0: use mean of black level programmed threshold in the row noise correction algorithm for low gains. 1: use black level frame average from the dark rows in the row noise correction algorithm for low gains. this frame average was taken before the last adjustment of the offset dac for that frame, so it might be slightly off. 0 n y bit 10 enable correction 0: normal operation. 1: enable row noise cancellation algorithm. when this bit is set, the average value of the dark columns read out is used as a correction for the whole row. the dark average is subtracted from each pixel on the row, and then a constant is added (bits 9:0). 1 n y table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 31 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bits 9:0 row noise constant constant used in the row noise ca ncellation algorithm. it should be set to the dark level targeted by the black level algorithm plus the noise expected between the averaged values of the dark columns. the default constant is set to 42 lsb. 2a n y r890x59 - black rows (r/w) bits 7:0 black rows for each bit set, the corresponding dark row (rows 0C7) are used in the black level algorithm. for this to occur, the reading of those rows must be enabled by the settings in r0x22:0. ff n n r910x5b - green1 frame average (r/o) bits 6:0 green1 frame average the frame-averaged green1 black level that is used in the black level calibration algorithm. r920x5c - blue frame average (r/o) bits 6:0 blue frame average the frame-averaged blue black level that is used in the black level calibration algorithm. r930x5d - red frame average (r/o) bits 6:0 red frame average the frame-averaged red black level that is used in the black level calibration algorithm. r940x5e - green2 frame average (r/o) bits 6:0 green2 frame average the frame-averaged green2 black level that is used in the black level calibration algorithm. r950x5f - threshold (r/w) bits 14:8 upper threshold upper threshold for targeted black level in adc lsbs. 23 n n bits 6:0 lower threshold lower threshold for targeted black level in adc lsbs. 1d n n r960x60 - calibration control (r/w) bit 15 disable rapid sweep mode disables the rapid sweep mode in the black level algorithm. the averaging mode remains enabled. 0 y n bit 12 recalculate when set to 1, the rapid sweep mode is triggered if enabled, and the running frame average is reset to the current frame average. this bit is write C 1, but always reads back as 0. 0 y n bit 10 limit rapid sweep 0: all dark rows can be used for the black level algorithm. this means that the internal average might not correspond to the calibration value used for the frame, so the dark row average should in this case not be used as the starting point for the digital frame-wise black level algorithm. 1: dark rows 8C11 are not used for the black level algorithm controlling the calibration value. instead, these rows are used to calculate dark averages that can be a starting point for the digital frame-wise black level algorithm. 0 n n bit 9 freeze calibration when set to 1, does not let the averaging mode of the black level algorithm change the calibration value. use this with the feature in the frame-wise black level algorithm that allows you to trigger the rapid sweep mode when the dark column average gets away from the black level target. 0 n n table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 32 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers bit 8 sweep mode when set to 1, the calibration value is increased by one every frame, and all channels are the same. this can be used to get a ramp input to the adc from the calibration dacs. 0 n n bits 7:5 frames to average over two to the power of this value determines how many frames to average when the black level algorithm is in the averaging mode. in this mode, the running frame average is calculated from the following formula: running frame ave = old running frame ave C (old running frame ave)/2 n + (new frame ave)/ 2 n . n = frames to average over. 4 n n bit 4 step size forced to 1 when set to 1, the step size is forced to 1 for the rapid sweep algorithm. default operation (0) is to start at a higher step size when in rapid sweep mode, to converge faster to the correct value. 0 n n bit 3 switch calibration values reserved. 0 bit 2 same red/blue when set to 1, the same calibration value is used for red and blue pixels: calib blue = calib red. 0 n y bit 1 same green when set to 1, the same calibration value is used for all green pixels: calib green2 = calib green1. 0 n y bit 0 manual override manual override of black level correction. 0: normal operation (default). 1: override automatic black level correction with programmed values. (r0x61:0Cr0x64:0). 0 n y r970x61 - green1 calibration value (r/w) bits 8:0 green1 calibration value analog calibration offset for green1 pixels, represented as a twos complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is negative and the magnitude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value computed by the black level calibration algorithm. if r0x60:0[0] = 1, this register is r/w and can be used to set the calibration offset manually. green1 pixels share rows with red pixels. 0 n y r980x62 - blue calibration value (r/w) bits 8:0 blue calibration value analog calibration offset for blue pixels, represented as a twos complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is negative and the magnit ude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value computed by the black level calibration algorithm. if r0x60:0[0] = 1, this register is r/w and can be used to set the calibration offset manually. 0 n y table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 33 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers r990x63 - red calibration value (r/w) bits 8:0 red calibration value analog calibration offset for red pixels, represented as a twos complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is negative and the magnit ude is given by not ([7:0]) + 1). if r0x60:0[0] = 0, this register is r/o and returns the current value computed by the black level calibration algorithm. if r0x60:0[0] = 1, this register is r/w and can be used to manually set the calibration offset. 0 n y r1000x64 - green2 calibration value (r/w) bits 8:0 green2 calibration value analog calibration offset for green2 pixels, represented as a twos complement signed 8-bit value (if bit 8 is clear, the offset is positive and the magnitude is given by bits 7:0. if bit 8 is set, the offset is negative and the magnit ude is given by not ([7:0]) + 1.) if r0x60:0[0] = 0, this register is r/o and returns the current value computed by the black level calibration algorithm. if r0x60:0[0] = 1, this register is r/w and can be used to manually set the calibration offset. green2 pixels share rows with blue pixels. 0 n y r1010x65 - clock (r/w) bit 15 pll bypass 0: use clock produced by pll as master clock. 1: bypass the pll. use extclk input signal as master clock. 1 n n bit 14 pll power- down 0: pll powered-up. 1: keep pll in power-down to save power (default). 1 n n bit 13 power-down pll during standby this register only has an effect when bit 14 = 0. 0: pll powered-up during standby. 1: turn off pll (power-down) during standby to save power (default). 1 n n bit 2 clk_newrow force clk_newrow to be on continuously. 0 n n bit 1 clk_newframe force clk_newframe to be on continuously. 0 n n bit 0 clk_ship force clk_ship to be on continuously. 0 n n r1020x66 - pll control 1 (r/w) bits 15:8 m m value for pll must be 16 or higher. 10 n n bits 5:0 n n value for pll. 00 n n r1030x67 - pll control 2 (r/w) bits 11:8 reserved do not change from default value. bits 6:0 p p value for pll. 00 n n r2400xf0 - page register (r/w) bits 2:0 page register must be kept at 0 to be able to write/read from sensor. used in soc to access other pages with registers. 0 n n r2410xf1 - bytewise address (r/w) bits 15:0 bytewise address special address to perform 16-bit reads and writes to the sensor in 8-bit chunks. see 8-bit write sequence on page 128. 0 n n table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 34 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor registers notes: 1. unless integration time is less than one frame (see r0x0b[13;0]). 2. f enabled by bit 3 (see r0x25[14]). r2420xf2 - context control (r/w) bit 15 restart setting this bit causes the sensor to abandon the current frame and start resetting the first row. same physical register as r0x0d:0[1]. 0 n ym bit 7 reserved reserved. 0 y n bit 3 read mode select 0: use read mode context a, r0x21:0. 1: use read mode context b, r0x20:0. bits only found in read mode context b register are always taken from that register. 1 y ym bit 2 reserved reserved. 0 y y bit 1 vertical blank select 0: use vertical blanking context a, r0x08:0. 1: use vertical blanking context b, r0x06:0. 1 y ym bit 0 horizontal blank select 0: use horizontal blanking context a, r0x07:0. 1: use horizontal blanking context b, r0x05:0. 1 y ym r2550xff - reserved (r/o) bits 15:0 reserved reserved. 1519 table 5: sensor core register description (continued) bit field description default (hex) syncd to frame start bad frame
mt9d131_ds rev. j 5/15 en 35 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 ifp registers, page 1 table 6: ifp registers, page 1 reg # bits default name 8 0x08 10:0 0x01f8 color pipeline control 0 0 toggles the assumption about bayer cfa (vertical shift). 0 : row containing blue comes first. 1 : row with red comes first. 1 0 toggles the assumption about bayer cfa (horizontal shift). 0 : green comes first. 1 : red or blue comes first. 2 0 1: enables lens shading correction. 3 1 1: enables on-the-fly defect correction. 4 1 1: enables 2d aperture correction. 5 1 0: bypasses color correction (unity color matrix). 1: enables color correction. 6 1 1: inverts output pixel clock (in all modes - jpeg, soc, sensor). 7 1 1: enables gamma correction. 8 1 1: enables decimator. 9 0 1: enables minblank. allows len generation 2 lines earlier. also adds 4 pixels to the line size. 10 0 1: enables 1d aperture correction. 9 0x09 4:0 0x000a factory bypass 1:0 1 data output bypass. selects data going to d out pads. 00: 10-bit sensor. 01: soc. 10: jpeg and output fifo (no bypass). reg16 and reg17 (page 2) have to be set to the correct output frame size. 11: reserved. 20reserved. 4:3 1 reserved. 10 0x0a 10:0 0x0488 pad slew 2:0 0 in bypass mode (r9[1:0] = 2): slew rate for d out [7:0], pixclk, frame_valid, and line_valid. during normal operation, the slew of listed pads is set by jp eg configuration registers. actual slew depends on load, temperature, and i/o voltage. set this register based on customers characterization results. 3 1 unused. 6:4 0 reserved. 7 0 0: disable i/o pad input clamp. set this bit to 1 before going to soft/hard standby to reduce the leakage current. when coming out of standby, set this bit back to 0. 1: enables i/o pad input clamp during standby.th at prevents elevated standby current if pad input floating. the pads are d out [7:0], frame_valid, line_valid, pixclk. 10:8 4 slew rate for s data . 7 = fastest slew; 0 = slowest. actual slew depends on load, temperature, and i/o voltage. actual slew depends on load, temperature, and i/o voltage. set this register based on customers characterization results.
mt9d131_ds rev. j 5/15 en 36 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 11 0x0b 8:0 0x00df internal clock control 01reserved. 11reserved. 21reserved. 3 1 1: enables output fifo clock. 4 1 1: enables jpeg clock. 50reserved. 61reserved. 71reserved. 80reserved. 17 0x11 10:0 0x0000 x0 coordinate for crop window use the crop window for pan and zoom. crop coordinates ar e updated synchronously with frame enable, unless freeze is enabled. in preview mode crop coordinates are automatically divided by x skip factor. coordinates are specified as (x0, y0) and (x1, y1), where x0 < x1 and y0 < y1. value is overwritten by mode driver (id = 7). 18 0x12 10:0 0x0640 x1 coordinate for crop window +1 see r17:1. value is overwritten by mode driver (id = 7). 19 0x13 10:0 0x0000 y0 coordinate for crop window see r17:1. value is overwritten by mode driver (id = 7). 20 0x14 10:0 0x04b0 y1 coordinate for crop window +1 see r17:1. value is overwritten by mode driver (id = 7). 21 0x15 13:0 0x0000 decimator control 00reserved. 10reserved. 2 0 high precision mode. additional bits for result are stored. can only be used for decimation > 2. 30reserved. 4 0 enables 4:2:0 mode. 5:6 0 reserved. this register controls operation of the decimator. value is overwritten by mode driver (id = 7). 22 0x16 12:0 0x0800 weight for horizontal decimation x output = int (x input/2048*reg. value). valu e is calculated and overwritten by mode driver (id = 7). 23 0x17 12:0 0x0800 weight for vertical decimation y output = int (y input/2048*reg. value). valu e is calculated and overwritten by mode driver (id = 7). inputsize is defined by registers 17C20. minimal outp ut size supported by the decimator is 3 x 1 pixel. 32 0x20 15:0 0xc814 luminance range of pixels considered in wb statistics 7:0 20 lower limit of luminance for wb statistics. 15:8 200 upper limit of lumi nance for wb statistics. to avoid skewing wb statistics by very dark or very bright values, this register allows programming the luminance range of pixels to be used for wb computation. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 37 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 45 0x2d 15:0 0x5000 right/left coordinates of awb measurement window 7:0 0 left window boundary. 15:8 80 right window boundary. this register specifies the right/left coordinates of the window used by awb measurement engine. the values programmed in the registers are desired boundaries divided by 8. 46 0x2e 15:0 0x3c00 bottom/top coordinates of awb measurement window 7:0 0 top window boundary. 15:8 60 bottom window boundary. this register specifies the bottom/top coordinates of the window used by awb measurement engine. the values programmed in the registers are desired boundaries divided by 8. 48 0x30 7:0 r/o red chrominance measure calculated by awb this register contains a measure of red chrominance ob tained using awb measurement algorithm. the measure is normalized to an arbitrary maximum value; the same for r48:1, r49:1, and r50:1. because of this normalization, only the ratios of values of registers r48:1 r49:1, and r50:1 should be used. 49 0x31 7:0 r/o luminance measure calculated by awb this register contains a measure of image luminance ob tained using awb measurement algorithm. the measure is normalized to an arbitrary maximum value; the same for r48:1, r49:1, and r50:1. because of this normalization, only the ratios of values of registers r48:1, r49:1, and r50:1 should be used. 50 0x32 7:0 r/o blue chrominance measure calculated by awb this register contains a measure of blue chrominance ob tained using awb measurement algorithm. the measure is normalized to an arbitrary maximum value; the same for r48:1, r49:1, and r50:1. because of this normalization, only the ratios of values of registers r48:1, r49:1, and r50:1 should be used. 53 0x35 15:0 0x1208 1d aperture correction parameters 7:0 8 ap_knee; threshold for aperture signal. 10:8 2 ap_gain; gain for aperture signal. 13:11 2 ap_exp; exponent for gain for aperture signal. 54 0x36 15:0 0x1208 2d aperture correction parameters 7:0 8 ap_knee; threshold for aperture signal. 10:8 2 ap_gain; gain for aperture signal. 13:11 2 ap_exp; exponent for gain for aperture signal. 14 0 reserved. defines 2d aperture gain and threshold. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 38 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 55 0x37 7:0 0x080 filters 2:0 0 uv filter: 000 : no filter 001 : 11110 averaging filter 010 : 01100 averaging filter 011 : 01210 averaging filter 100 : 12221 averaging filter 101 : median 3 110 : median 5 111 : reserved 4:3 0 y filter mode: 00 : no filter 01 : median 3 10 : median 5 11 : reserved 5 0 permanently enables y filter. 59 0x3b 9:0 0 second black level this register contains the value subtracted by ifp from pixe l values prior to ccm. if the subtraction produces a negative result for a particular pixel, the value of this pixel is set to 0. 60 0x3c 9:0 42 first black level this register contains the value subtracted by ifp from raw pi xel values before applying lens shading correction and digital gains. if the subtraction produces a negative result for a particular pixel, the value of this pixel is set to 0. typically, the subtracted value should be equal to the black level targeted by the sensor. this value is subtracted from all test patterns as well. 67 0x43 0 1 enable support for preview modes 1: enables automatic recalculation operation of coefficient lens correction dependent on sensor output resolution. 68 0x44 15:0 n/a mirrors sensor register 0x20 read only 69 0x45 15:0 n/a mirrors sensor register 0xf2 read only 70 0x46 15:0 n/a mirrors sensor register 0x21 read only 71 0x47 7:0 16 edge threshold for interpolation threshold for identifying pixel ne ighborhood as having an edge. 72 0x48 2:0 0 test pattern 2:0 0 test mode. 001 : flat field; rgb values are specified in r73-75:1 010 : vertical monochrome ramp 011 : vertical color bars 100 : vertical monochrome bars; set bar intensity in r73:1 and r74:1 101 : pseudo-random test pattern 110 : horizontal monochrome bars; set ba r intensity in r73:1 and r74:1 injects test pattern into beginning of color pipeline. 73 0x49 9:0 256 test pattern r/monochrome value 74 0x4a 9:0 256 test pattern g/monochrome value table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 39 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 75 0x4b 9:0 256 test pattern b value 78 0x4e 7:0 32 digital gain 2 default setting 32 corresponds to gain valu e of 1. gain scales linearly with value. 96 0x60 14:0 0x2923 color correction ma trix exponents for c11...c22 2:0 : matrix element 1 (c11) exponent 5:3 : matrix element 2 (c12) exponent 8:6 : matrix element 3 (c13) exponent 11:9 : matrix element 4 (c21) exponent 14:12 : matrix element 5 (c22) exponent 97 0x61 11:0 0x0524 color correction ma trix exponents for c22...c33 2:0 : matrix element 6 (c23) exponent 5:3 : matrix element 7(c31) exponent 8:6 : matrix element 8(c32) exponent 11:9 : matrix element 9(c33) exponent the value of a matrix coefficient is calculated cij = (1 - 2*sij)*mij*2^-(eij + 4), ????? eij < = 4 where sij is coefficients sign, mij is the mantissa, and eij is the exponent. 98 0x62 15:0 0xbbc8 color correction matrix elements 1 and 2 mantissas 7:0 200 color correction matrix element 1 (c11). 15:8 187 color correction matrix element 2 (c12). 99 0x63 15:0 0xca3a color correction matrix elements 3 and 4 mantissas 7:0 58 color correction matrix element 3 (c13). 15:8 202 color correction matrix element 4 (c21). 100 0x64 15:0 0x3b85 color correction matrix elements 5 and 6 mantissas 7:0 133 color correction matrix element 5 (c22). 15:8 59 color correction matrix element 6 (c23). 101 0x65 15:0 0xf26f color correction matrix elements 7 and 8 mantissas 7:0 111 color correction matrix element 7 (c31). 15:8 242 color correction matrix element 8 (c32). 102 0x66 13:0 0x3d9c color correction matrix element 9 mantissa and signs 7:0 156 color correction matrix element 9 (c33). 13:8 61 signs for off-diagonal ccm elements. bit 8 : sign for c12 bit 9 : sign for c13 bit 10 : sign for c21 bit 11 : sign for c23 bit 12 : sign for c31 bit 13 : sign for c32 1 : indicates negative 0 : indicates positive signs for c11, c22, and c33 are assumed always positive. 106 0x6a 9:0 128 digital gain 1 for red pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 107 0x6b 9:0 128 digital gain 1 for green1 pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 40 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 108 0x6c 9:0 128 digital gain 1 for green2 pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 109 0x6d 9:0 128 digital gain 1 for blue pixels default setting 128 corresponds to gain valu e of 1. gain scales linearly with value. 110 0x6e 9:0 128 digital gain 1 for all colors write 128 to set all gains (r106- r109) to 1. when read, this re gister returns the value of r107. 122 0x7a 15:0 80 boundaries of flicker me asurement window (left/width) 7:0 80 window width. 15:8 0 left window boundary. this register specifies the boundaries of the window used by the flicker measur ement engine. the values programmed in the registers are the desired boundaries divided by 8. 123 0x7b 15:0 0x0088 boundaries of flicker measurement window (top/height) 5:0 8 window height. 15:6 2 top window boundary. this register specifies the boundaries of the window used by the flicker measurement engine. 124 0x7c 15:0 5120 flicker measurement window size this register specifies the number of pixels in th e window used by the flicker measurement engine. 125 0x7d 15:0 r/o measure of average luminance in flicker measurement window 150 0x96 00blank frames 0 0 0: when bit is unset, output resumes with th e next frame. the bit is synchronized with frame enable. see freeze bit (r152[7])1: blank outgoing frames. 1: when bit is set, current frame completes and following frames are not output, fen = len = 0. 151 0x97 7:0 0 output format configuration 0 0 in yuv output mode, swaps cb and cr channe ls. in rgb mode, swaps r and b. this bit is subject to synchronous update. 1 0 swaps chrominance byte with luminance byte in yuv output. in rgb mode, swaps odd and even bytes. this bit is subject to synchronous update. 20reserved. 3 0 monochrome output. 4 0 1: uses itu-r bt.601 codes when bypassing fifo. (0xab = frame start; 0x80 = line start; 0x9d = line end; 0xb6 = frame end.) 500: output yuv 1: output rgb (see r151[7:6]) 7:6 0 rgb output format: 00: 16-bit rgb565 01: 15-bit rgb555 10: 12-bit rgb444x 11: 12-bit rgbx444 table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 41 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 152 0x98 2:0 0 output format test 0 0 1: disables cr channel (r in rgb mode). 1 0 1: disables y channel (g in rgb mode). 2 0 1: disables cb channel (b in rgb mode). 5:3 0 test ramp output: 00 : off 01 : by column 10 : by row 11 : by frame 6 0 1: enables 8+2 bypass. 7 0 1: freezes update of soc registers affecting output size and format. these include r151:1, r17-23:1. 153 0x99 11:0 r/o line count 154 0x9a 15:0 r/o frame count 164 0xa4 15:0 0x6440 special effects 2:0 0 special effect selection bits: 0 : disabled 1 : monochrome 2 : sepia 3 : negative 4 : s olarization with unmodified uv 5 : solarization with -uv 5:3 0 dither enable and amplitude. vali d values are 1...4, others disable. 6 1 1: dithers only in luma channel, 0: dither in all color channels. 15:8 0 solarization threshold for luma, divided by 2; 64...127. 165 0xa5 15:0 0xb023 sepia constants 7:0 35 sepia constant for cr. 15:8 176 sepia constant for cb. 178 0xb2 15:0 0x2700 gamma curve knees 0 and 1 7:0 ordinate of gamma curve knee point 0 (its abscissa is 0). 15:8 gamma curve knee point 1. gamma correction curve is implemented in the mt9d131 as a piecewise linear function ma pping 12-bit arguments to 8- bit output. seventeen line fragments forming the curve connect 19 knee points, whose abscissas are fixed and ordinates are programmable through registers r[178:187]:1. the abscissas of the knee points are 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. ordinates of knee points written directly to the registers r[178:187]:1 may be overwr itten by mode driver (id = 7). the recommended way to program a gamma curve into the mt9d131 is to write desired knee ordinates to one of the two mode.gamma_table[a/b ][] arrays that hold gamma curves used in contexts a and b. once the desired ordinates are in one of those arrays, all that is needed to put them into effect (that is, into the registers) is a short command tellin g the sequencer to go to prop er context or through refresh loop. 179 0xb3 15:0 0x4936 gamma curve knees 2 and 3 7:0 gamma curve knee point 2. 15:8 gamma curve knee point 3. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 42 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 1 180 0xb4 15:0 0x7864 gamma curve knees 4 and 5 7:0 gamma curve knee point 4. 15:8 gamma curve knee point 5. 181 0xb5 15:0 0x9789 gamma curve knees 6 and 7 7:0 gamma curve knee point 6. 15:8 gamma curve knee point 7. 182 0xb6 15:0 0xb0a4 gamma curve knees 8 and 9 7:0 gamma curve knee point 8. 15:8 gamma curve knee point 9. 183 0xb7 15:0 0xc5bb gamma curve knees 10 and 11 7:0 gamma curve knee point 10. 15:8 gamma curve knee point 11. 184 0xb8 15:0 0xd7ce gamma curve knees 12 and 13 7:0 gamma curve knee point 12. 15:8 gamma curve knee point 13. 185 0xb9 15:0 0xe8e0 gamma curve knees 14 and 15 7:0 gamma curve knee point 14. 15:8 gamma curve knee point 15. 186 0xba 15:0 0xf8f0 gamma curve knees 16 and 17 7:0 gamma curve knee point 16. 15:8 gamma curve knee point 17. 187 0xbb 7:0 0x00ff gamma curve knee 18 190 0xbe 3:0 6 yuv/ycbcr control 3 0 clips y values to 16C235; clips uv values to 16C240. 2 1 adds 128 to u and v values. 1 1 0: uses srgb coefficients. 1: itu-r bt.601 coefficients 0 0 0: no scaling 1: scales y data by 219/256 and uv data by 224/256. 191 0xbf 15:0 0 y/rgb offset 15:8 0 y offset. 7:0 0 rgb offset. 195 0xc3 15:0 0 microcontroller boot mode 0 0 1: reset microcontroller. 1,2,3,6:4, 6:5,7:5 0 reserved. 7 0 microcontroller debug indicator. 11:8,12,13,1 4,15 r/o reserved. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 43 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 ifp registers, page 2 198 0xc6 15:0 0 microcontroller variable address 7:0 0 bits 7:0 of address for physical access; driver variable offset for logical access. 12:8 0 bits 12:8 of address for physical access; driver id for logical access. 14:13 0 bits 14:13 of address for physical access ; r0xc6:1[14:13] = 01 select logical access. 15 0 0: 16-bit 1: 8-bit access microcontroller variables are similar to two-wire serial interface registers, except that they are located in the microcontrollers memory and have different bit widths. regist ers 198:1 and r200:1 provide easy access to variables that can be represented as 8- or 16-bit unsigned integers (bytes or words). to access such a variable, one must write its address to r0xc6:1 and then read its value from r200:1 or write a new value to the same register. variables having more than 16 bits (for example 32-bit unsigned long integers) must be accesse d as arrays of bytes or words - there is no way to read or write their values without parsing. variable address written to r0xc6:1 can be physical or logi cal. physical address is the actual address of a byte or word in the microcontroller's addr ess space. the logical addressing option is provided only to facilitate access to public variables of va rious firmware drivers. logical address of a public variable consists of a 5-bit dri ver id 1 = sequencer, and so on) and 8-bit offset of the variable in the drivers data structure (which cannot be larger than 256 bytes). 200 0xc8 15:0 0 microcontroller variable data to read current value of an 8- or 16-bit variable from mi crocontroller memory, write its address to r0xc6:1 and read r200:1. to change value of a variable, write its address to r0xc6:1 and its new value to r200:1. when bit width of a variable is specified as 8 bits (r0xc6:1[15] = 1), the upper byte of r200:1 is irrelevant. it is set to 0 when the register i s read and ignored when it is written to. see r0xc6:1 above for explanation how to read and set variables having more than 16 bits. 201-209 0xc9-d1 15:0 0 microcontroller variable data using burst two-wire serial interface access use these registers to read or write up to 16 bytes of variable data using the burs t two-wire serial interface access mode. the variables must have consecutive addresses. 240 0xf0 2:0 1 page register 0: sensor core 1: ifp page 1 2: ifp page 2 241 0xf1 15:0 0 bytewise address special address to perform 16-bit reads and writes to the sensor in 8-bit chunks. see 8-bit write sequence on page 128. table 7: ifp registers, page 2 reg # bits default name 0 0x00 15:0 0 jpeg control register 0 0 start/enable encoder: enable jpeg encoding at the start of next frame. 1 0 test sram: when set, allows host or microcontroller to take control of the output fifo buffer and the sixteen 800 x 16 rams in the re-order buffer for testing. used in conjunction with jpeg ram test controls register to simultaneously writ e all 17 rams and individually read each ram. [14:2] return zero when read. 15 0 soft reset. table 6: ifp registers, page 1 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 44 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 2 0x02 15:0 0 jpeg status register 0 0 0 transfer done status flag. when bit is set to 1, it indicates that the completion of transfer of the jpeg-compressed image. this status flag remains set until cleared by the host or microcontroller by writing 1 to bit [0]. subsequent ly, the output fifo overflow, the spoof oversize error and the re- order buffer error status bits are reset. the output buffer clock must be present to clear this bit. 1 0 output fifo overflow status flag. when bit is set to 1, it indicates that an overflow condition was detected in the output fifo during the frame transfer and that transfer was terminated prematurely. this status flag remains set until clea red by the host or microcontroller as it clears transfer done flag. valid for jpeg compressed images only. 2 0 spoof oversize error status flag. when bit is set to 1, it indicates that the spoof frame size is too small for jpeg data stream. this status flag remains set until cleared by the host or microcontroller as it clears transfer done flag. valid for jpeg compressed images only. 3 0 re-order buffer error status flag: when the re-order buffer detects an overflow or underflow condition, this bit is set to 1. this bit is cleared by writing a 1 to bit[0] of this register. 5:4 0 watermark of the output fifo. 00 : less than 25% full 01 : 25% to less than 50% full 10 : 50% to less than 75% full 11 : 75% full or more watermark is cleared when the host or microcontro ller writes 1 to bit 4 of this register (r258). 7:6 0 qtable_id. 00 : quantization table set 0 01 : quantization table set 1 10 : quantization table set 2 11 : reserved 15:8 0 jpeg data length bits 23:16. high est byte of 24-bit jpeg data length. 3 0x03 15:0 0 jpeg status register 1 - jpeg data length bits 15:0 this register combined with r2:2[15:8] gives th e total number of data bytes successfully encoded ? a 24-bit jpeg data length. if an output fifo overflow occurs , this register holds the total number of data bytes already sent out by the jpeg encoder (up to the point where the overflow occurs). 4 0x04 2:0 0 jpeg status register 2 - output fifo fullness status instantaneous fifo fullness status code: 000 : fifo is empty 001 : 0% < fullness < 25% 011 : 25% < = fullness < 50% 010 : 50% < = fullness < 75% 110 : 75% < = fullness < = 100% 5 0x05 5:0 0 jpeg front end configuration register 1 0 jpeg monochrome mode. when this bit is set, the re-order buffer control sends only luma data to the jpeg encoder. 0 0 color component composition: 0 : 4:2:2 format 1 : 4:2:0 format 6 0x06 0:0 0 jpeg core configuration register - extend jpeg quantization matrix presently, the jpeg encoder core supports two sets of quantization tables. (each set contains a pair of quantization tables - one for luma, one for chroma.) the quantization memory availabl e allows an additional set of quantization tables to be stored. by setting this bit to 1, the encoder uses the third ta ble pair. if the bit is set to 0, then whichever set of tabl es 1 and 2 was programmed will be used. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 45 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 10 0x0a 0:0 1 jpeg encoder bypass set bit 0 to 1 of this register to have uncompressed frames from the soc captured in the output fifo and transferred out as spoof frames (jpeg encoder is bypassed). register 13, bit 0, should be set to 1 for spoof-mode output. when the bit is cleared (set to 0), jpeg-encoded frames are transferred out through the fifo. 13 0x0d 10:0 0x0007 output configuration register 0 1 enable spoof frame: when this bit is set to 1, the data captured in the output fifo is sent out as a spoofed frame, formatted according to information stored in the various spoof registers. this output mode can be used to output both jp eg-compressed and uncompressed image data. jpeg data may be padded if dummy data is needed. during line_valid assertion period, the output clock is only clocked when there is valid jpeg data or padded dummy data to be transmitted. this may result in a non-uniform clock period. when line_valid is de-asserted, the output clock is enabled according to spoof_lv_lead and spoof_lv _trail setting. jpeg soi/eoi markers cannot be inserted into spoof frames. 1 1 enable output pixel clock between frames: when th is bit is set to 1, this bit enables the pixel clock to run whether frame_valid is low or high. clearing the bit disables the clock during the periods when frame_valid is de-asserted except for soi/eoi markers transmission if they are outside the fv assertion period. the gating off of this output pixel clock saves power. 2 1 enable pixel clock during invalid data: when this bit is set to 1, the pixel clock runs continuously while frame_valid is asserted but line_valid is de-asserted. when cleared, it causes the pixel clock to be active only when valid jpeg data are output. disabling pixel clock during line_valid de-assertion is not support in spoof frame. 3 0 enable soi/eoi insertion: when this bit is set to 1, this bit causes soi and eoi markers to be output at the beginning and end of every jpeg-encoded frame. when the bit is cleared, only jpeg data bytes are output. 4 0 insert soi and eoi when frame_valid is high: when this bit is set to 1, soi and eoi are inside fv assertion period. when it is0, soi, and eoi are outside frame_valid assertion period. this bit is relevant only when soi/eoi insertion is enabled. 5 0 ignore spoof frame height: this bit is used in conjunction with bit 0 that enables spoof framing. when this bit is set to 1, the jpeg unit output section ignores the spoof frame height register. the spoof frame ends when either jpeg bytes or uncompressed image data are exhausted. both kinds of data are always padded with dummy data to the programmed spoof frame width. 6 0 enable variable pixel clock rate: when this bit is set to 1, it enables the adaptive pixel clock frequency feature. the pixel clock is switched fr om pclk1 to pclk2 to pclk3, depending on the output fifo fullness. when fullness reaches 50%, th e pixel clock is switched from pclk1 to pclk2. when the fullness reaches 75%, the clock is switch ed to pclk3. as the fifo fullness drops below 50%, pixclk switches from pclk3 to pclk2; as it drops below 25%, it switches back to pclk1. at the start of a frame, it always starts with pclk1. 7 0 enable byte swap: toggling this bit swaps the even and odd bytes in jpeg data stream. byte swapping supported only when enable spoof frame is set. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 46 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 8 0 duplicate frame_valid on line_valid: when this bit is set to 1, the frame_valid waveform is output on line_valid output also; therefore, the two are identical. 9 0 enable status insertion: when this bit is set to 1, the jpeg module appends the status byte to the end of the jpeg byte stream. this register shou ld only be set when transferring in continuous mode. the status byte inserted at the end of the jpeg byte stream is reg2 bit [7:0]. 10 0 enable spoof itu-r bt.601 codes: this bit is relevant matters when uncompressed frames are output in the spoof mode. when this bit is set to 1, the bit causes the itu-r bt.601 markers sof, eof, sol, eol to be inserted into every frame. codes are: start of frame: ff0000ab end of frame: ff0000b6 start of line: ff000080 end of line: ff00009d 11 0 freeze_update; default = 0. when this bit is set to 1, it disables the tran sfer of values from regi sters 0x0a, 0x0d (except freeze_update), 0x0e, 0x0f, 0x10, 0x11, 0x12 into their corresponding shadow registers. when cleared, the shadow registers are updated with values from their corresponding configuration registers at the end of vertical blanking of the input image. the shadow registers allow the microcontroller to change configuration registers values during the active frame time without corrupting the current frame transfer. 14 0x0e 15:0 0x0501 output pclk1 & pclk2 configuration register 3:0 0x1 output clock frequency divisor n1: this 4-bit re gister contains an integer divisor used to divide master clock frequency to obtain the frequency of ou tput clock source pclk1. a value of 0 in this register has the same effect as 1. 7:5 0 pclk1 slew rate: the value contained in this 3-bit register determines the slew rate of the output clock when pclk1 is selected as its source. 11:8 0x5 output clock frequenc y divisor n2: this 4-bit register contai ns an integer divisor used to divide master clock frequency to obtain the frequency of output clock source pclk2. the output clock switches from pclk1 to pclk2 when the output bu ffer fullness reaches 50%. a value of 0 in this register has the same effect as 1. 12 0 not used. 15:13 0 pclk2 slew rate: the value contained in this 3-bit register determines the slew rate of the output clock when pclk2 is selected as its source. 15 0x0f 7:0 0x0003 output pclk3 configuration register 3:0 0x03 output clock frequency divisor n3: this 4-bit re gister contains an integer divisor used to divide master clock frequency to obtain the frequency of output clock source pclk3. the output clock switches from pclk2 to pclk3 when the output buffe r fullness reaches 75 %. a value of 0 in this register has the same effect as 1. 40not used. 7:5 0 pclk3 slew rate: the value contained in this 3-bit register determines the slew rate of the output clock when pclk3 is selected as its source. 16 0x10 11:0 0x0640 spoof frame width this register defines the width of the spoof frame used to outp ut data captured in the output fifo. it corresponds to the real time assertion of line_valid in terms of nu mber of pixclks. it must be an even number. 17 0x11 11:0 0x0258 spoof frame height this register defines the height of the sp oof frame used to output data captured in the output fifo. the height is equal to the number of assertions of line_valid within one assertion of frame_valid. the value stored in this register is ignored if bit r13:2[5] is set. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 47 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 18 0x12 15:0 0x0606 spoof frame line timing 7:0 0x6 spoof line_valid lead. the number of clocks before line_valid is asserted in a spoof frame. this must be a minimum value of 5. 15:8 0x6 spoof line_valid trail. the number of clocks af ter line_valid is de-asserted in a spoof frame. this must be a minimum value of 5. 29 0x1d 15:0 0 jpeg ram test control register 9:0 0 tested sram address: this register defines th e location in the seventeen 800 x 16 rams that is being accessed by the host or microcontroller wh ile testing the group of srams. a specified 16-bit location can be selected from 0 through 799. the address is automatically incremented when r31:2 is written during sram test data wr ite or read during sram test data read. 12:10 0 test y/c sram register: address the same set of 8 srams (either for y or for c), this register setting identifies which of the 8 srams is selected. 0 00 for sram1, 001 for sram2, , 111 for sram8. 13 0 test y/c sram select register: select a bank of 8 srams from luminance or from chrominance. y = 1, c = 0. 14 0 test output buffer sram: select to read output buffer sram and supersedes y/c srams. if this bit is set to 1, data from the output buffer ram is selected to be read. during data write, this has no effect. 15 0 sram write enable. this bit is used in conjunction with the ram selection re gister. when this bit is set to 1, the ram specified in the selection regist er undergoes a test write cycle. data residing in the indirect data register r31:2 is loaded in to all seventeen 800 x 16 srams simultaneously. resetting the bit to 0, thereafter causes a test read cycle to be performed and the data is read from the srams and loaded back into r31:2. this bit is write_enable when 1; read_enable when 0. the read and write cycles occur when r31:2 is accessed. 30 0x1e 15:0 0 jpeg indirect access control register 10:0 0 indirect access address register: this 11-bit register contains the address of the register or memory to be accessed indirectly. 12:11 0 unused. 13 0 enable two-wire serial interface burst: when this bit is set to 1, the two-wire serial interface decoder operates in burst mode for the indirect data register (read burst and write burst). the longest burst supported is 16 (128 read or write cycles). 14 0 enable indirect writing: when this bit is set to 1, data from the indirect data register is written to the indirect address location specified by [10:0] of this register except when auto-increment is set. reading the same address location when this bit is reset to 0. 15 0 address auto-increment: when this bit is set to 1 , the value in the indirect access address register is automatically incremented after every read or wr ite, to the jpeg indirect access data register. this feature is used to emulate a burst access to memory or registers being accessed indirectly. 31 0x1f 15:0 0 jpeg indirect access data register writing to, and reading from this register , is equivalent to performing these op erations on registers or memory being indirectly accessed. when address auto-increment bit is set in jpeg indirect access control register, multiple writes or reads from this register affect a burst data transfer. data is written to or read from indirect registers (when testsram reg 0x0[1] is set to 0), or the 800 x 16 srams (when testsram is set to 1). 32-46 0x20- 0x2e 15:0 0 jpeg indirect access data register same as r31:2 when doing two-wire serial interface burst. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 48 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 128 0x80 10:0 0x0160 lens correction control 0 0 sign for the k*f(x)*f(y). if 0, then k is positive; if 1, then k is negative. 1 0 when this bit is set to 1, all the second x derivatives are doubled. 2 0 when this bit is set to 1, all the second y derivatives are doubled. 3:5 100 divisor for the first derivative, x direction. 000-/1, 001-/2, 0 10-/4, ... 111-/128. also applies to second derivative. 6:8 101 divisor for the first derivative, y direction. 00 0-/1, 001-/2, 010-/4, ... 111-/128. also applies to second derivative. 9 0 shift column, lc specific. 10 0 shift row, lc specific. this register controls behavior of lens correction. 129 0x81 15:0 0x6432 zone boundaries x1 and x2 7:0 x2 boundary (/4) position. 15:8 x1 boundary (/4) position. definition of x1 and x2 boundaries 130 0x82 15:0 0x3296 zone boundaries x0 and x3 7:0 x0 boundary (/4) position. 15:8 x3 boundary (/4) position. definition of x0 and x3 boundaries. 131 0x83 15:0 0x9664 zone boundaries x4 and x5 7:0 x4 boundary (/4) position. 15:8 x5 boundary (/4) position. definition of x4 and x5 boundaries. 132 0x84 15:0 0x5028 zone boundaries y1 and y2 7:0 y2 boundary (/4) position. 15:8 y1 boundary (/4) position. definition of y1 and y2 boundaries. 133 0x85 15:0 0x2878 zone boundaries y0 and y3 7:0 y0 boundary (/4) position. 15:8 y3 boundary (/4) position. definition of y0 and y3 boundaries. 134 0x86 15:0 0x7850 zone boundaries y4 and y5 7:0 y4 boundary (/4) position. 15:8 y5 boundary (/4) position. definition of y4 and y5 boundaries. 135 0x87 15:0 0x0000 center offset 7:0 offset of lc center in respect to geometrical center. x coordinate(/4). 15:8 offset of lc center in respect to geometrical center. ycoordinate(/4). offset of the central point for the lens correction (relative to the center of imaging array). 136 0x88 11:0 0x015e f(x) for red color at the first pixel of the array 137 0x89 11:0 0x0143 f(x) for green color at the first pixel of the array table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 49 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 138 0x8a 11:0 0x0127 f(x) for blue color at the first pixel of the array 139 0x8b 11:0 0x012c f(y) for red color at the first pixel of the array 140 0x8c 11:0 0x0103 f(y) for green color at the first pixel of the array 141 0x8d 11:0 0x00fd f(y) for blue color at the first pixel of the array 142 0x8e 11:0 0x0cef df/dx for red color at the first pixel of the array 143 0x8f 11:0 0x0d38 df/dx for green color at the first pixel of the array 144 0x90 11:0 0x0d92 df/dx for blue color at the first pixel of the array 145 0x91 11:0 0x0c18 df/dy for red color at the first pixel of the array 146 0x92 11:0 0x0cf1 df/dy for green color at the first pixel of the array 147 0x93 11:0 0x0d05 df/dy for blue color at the first pixel of the array 148 0x94 15:0 0x0b03 second derivative for zone 0 red color 7:0 d2f/dx2 for zone 0 red color. 15:8 d2f/dy2 for zone 0 red color. second derivative for red color in zone 0. 149 0x95 15:0 0x0000 second derivative for zone 0 green color 7:0 d2f/dx2 for zone 0 green color. 15:8 d2f/dy2 for zone 0 green color. second derivative for green color in zone 0. 150 0x96 15:0 0x0100 second derivative for zone 0 blue color 7:0 d2f/dx2 for zone 0 blue color. 15:8 d2f/dy2 for zone 0 blue color. second derivative for green color in zone 0. 151 0x97 15:0 0x2534 second derivative for zone 1 red color 7:0 d2f/dx2 for zone 1 red color. 15:8 d2f/dy2 for zone 1 red color. second derivative for red color in zone 1. 152 0x98 15:0 0x1c33 second derivative for zone 1 green color 7:0 d2f/dx2 for zone 1 green color. 15:8 d2f/dy2 for zone 1 green color. second derivative for green color in zone 1. 153 0x99 15:0 0x1a2e second derivative for zone 1 blue color 7:0 d2f/dx2 for zone 1 blue color. 15:8 d2f/dy2 for zone 1 blue color. second derivative for green color in zone 1. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 50 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 154 0x9a 15:0 0x2a3a second derivative for zone 2 red color 7:0 d2f/dx2 for zone 2 red color. 15:8 d2f/dy2 for zone 2 red color. second derivative for red color in zone 2. 155 0x9b 15:0 0x252d second derivative for zone 2 green color 7:0 d2f/dx2 for zone 2 green color. 15:8 d2f/dy2 for zone 2 green color. second derivative for green color in zone 2. 156 0x9c 15:0 0x2823 second derivative for zone 2 blue color 7:0 d2f/dx2 for zone 2 blue color. 15:8 d2f/dy2 for zone 2 blue color. second derivative for green color in zone 2. 157 0x9d 15:0 0x0f14 second derivative for zone 3 red color 7:0 d2f/dx2 for zone 3 red color. 15:8 d2f/dy2 for zone 3 red color. second derivative for red color in zone 3. 158 0x9e 15:0 0x0d20 second derivative for zone 3 green color 7:0 d2f/dx2 for zone 3 green color. 15:8 d2f/dy2 for zone 3 green color. second derivative for green color in zone 3. 159 0x9f 15:0 0x0421 second derivative for zone 3 blue color 7:0 d2f/dx2 for zone 3 blue color. 15:8 d2f/dy2 for zone 3 blue color. second derivative for green color in zone 3. 160 0xa0 15:0 0x0d2a second derivative for zone 4 red color 7:0 d2f/dx2 for zone 4 red color. 15:8 d2f/dy2 for zone 4 red color. second derivative for red color in zone 4. 161 0xa1 15:0 0x1017 second derivative for zone 4 green color 7:0 d2f/dx2 for zone 4 green color. 15:8 d2f/dy2 for zone 4 green color. second derivative for green color in zone 4. 162 0xa2 15:0 0x1617 second derivative for zone 4 blue color 7:0 d2f/dx2 for zone 4 blue color. 15:8 d2f/dy2 for zone 4 blue color. second derivative for green color in zone 4. 163 0xa3 15:0 0x1642 second derivative for zone 5 red color 7:0 d2f/dx2 for zone 5 red color. 15:8 d2f/dy2 for zone 5 red color. second derivative for red color in zone 5. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 51 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 164 0xa4 15:0 0x1448 second derivative for zone 5 green color 7:0 d2f/dx2 for zone 5 green color. 15:8 d2f/dy2 for zone 5 green color. second derivative for green color in zone 5. 165 0xa5 15:0 0x0f4e second derivative for zone 5 blue color 7:0 d2f/dx2 for zone 5 blue color. 15:8 d2f/dy2 for zone 5 blue color. second derivative for green color in zone 5. 166 0xa6 15:0 0x1f27 second derivative for zone 6 red color 7:0 d2f/dx2 for zone 6 red color. 15:8 d2f/dy2 for zone 6 red color. second derivative for green color in zone 6. 167 0xa7 15:0 0x1a12 second derivative for zone 6 green color 7:0 d2f/dx2 for zone 6 green color. 15:8 d2f/dy2 for zone 6 green color. second derivative for green color in zone 6. 168 0xa8 15:0 0x1e16 second derivative for zone 6 blue color 7:0 d2f/dx2 for zone 6 blue color. 15:8 d2f/dy2 for zone 6 blue color. second derivative for blue color in zone 6. 169 0xa9 15:0 0x16c7 second derivative for zone 7 red color 7:0 d2f/dx2 for zone 7 red color. 15:8 d2f/dy2 for zone 7 red color. second derivative for red color in zone 7. 170 0xaa 15:0 0x31c5 second derivative for zone 7 green color 7:0 d2f/dx2 for zone 7 green color. 15:8 d2f/dy2 for zone 7 green color. second derivative for green color in zone 7. 171 0xab 15:0 0x2ab6 second derivative for zone 7 blue color 7:0 d2f/dx2 for zone 7 blue color. 15:8 d2f/dy2 for zone 7 blue color. second derivative for blue color in zone 7. 172 0xac 15:0 0x0000 x2 factors 7:0 x2 factors for x zones. if 1 value of the value of d2f/dx2 is multiplied by 2. 15:8 x2 factors for y zones. if 1 value of the value of d2f/dy2 is multiplied by 2. 173 0xad 7:0 0x0002 global offset of f(x,y) function signed 8 bit number. value of 32 corresponds to gain of 1. works as digital gain 174 0xae 15:0 0x018e k factor in k f(x) f(y) this factor can increase lens compensa tion in the corners to up to 2 times. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 52 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 192 0xc0 15:0 0 boundaries of first ae measurement window (top/left) 7:0 left window boundary. 15:8 top window boundary. this register specifies top and left bound aries of the first from 16 (left-top) wind ow used by ae measurement engine. the values programmed in the registers are desired boundaries divided by 8. 193 0xc1 15:0 0x3c50 boundaries of first ae measurement window (height/width) 7:0 window width. 15:8 window height. this register specifies height and width of the first from 16 window used by ae measurement engine. the values programmed in the registers are desired boundaries divided by 2. 194 0xc2 15:0 0x4b00 ae measurement window size (lsw) this register number of pi xels in the window used by ae measurement engine. 195 0xc3 2:0 6 ae measurement enable 0 0 ms bit of the ae measurement window size. 1 1 ae statistic enable. 21reserved. this register specifies number of pixels in the window used by ae measurement engine. 196 0xc4 15:0 r/o average luminance in ae windows w12 and w11 7:0 average y in w11 (top left). 15:8 average y in w12. 197 0xc5 15:0 r/o average luminance in ae windows w14 and w13 7:0 average y in w13. 15:8 average y in w14 (top right). 198 0xc6 15:0 r/o average luminance in ae windows w22 and w21 7:0 average y in w21. 15:8 average y in w21. 199 0xc7 15:0 r/o average luminance in ae windows w24 and w23 7:0 average y in w23. 15:8 average y in w24. 200 0xc8 15:0 r/o average luminance in ae windows w32 and w31 7:0 average y in w31. 15:8 average y in w32. 201 0xc9 15:0 r/o average luminance in ae windows w34 and w33 7:0 average y in w33. 15:8 average y in w34. 202 0xca 15:0 r/o average luminance in ae windows w42 and w41 7:0 average y in w41 (bottom left). 15:8 average y in w43. 203 0xcb 15:0 r/o average luminance in ae windows w44 and w43 7:0 average y in w43. 15:8 average y in w44 (bottom right). table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 53 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor ifp registers, page 2 210 0xd2 9:0 0x0194 saturation and color kill 2:0 4 saturation; 100 = 100%. scales linearly with value. 5:3 2 color kill gain. determines rate of gain decrease above threshold. if pixel value is above threshold the difference is multiplied by 2^ value-1 (for 0 factor is 0) and subtracted from the base gain. 8:6 6 color kill threshold. color kill affects only pixels with value larger then 128*value. 9 0 reserved. 211 0xd3 15:0 0 histogram window lower boundaries 7:0 x0/8. 15:8 y0/8. 212 0xd4 15:0 0x95c7 histogram window upper boundaries 7:0 x1/8. 15:8 y1/8. 213 0xd5 10:0 0x030a first set of bin definitions 7:0 offset for bin 0, divided by 4 on 10-bit scale. 10:8 bin width, 0-4lsb,1-8lsb,2-16lsb,7-512lsb on a 10-bit scale. 214 0xd6 10:0 0x030a second set of bin definitions 7:0 offset for bin 0, divided by 4 on 10-bit scale. 10:8 bin width, 0-4lsb,1-8lsb,2-16lsb,7-512lsb on a 10-bit scale. 215 0xd7 13:0 0x000a histogram window size 12:0 1 number of pixels in the window used by the histogram, set to width*height. 13 0 select a bin set to read. 0 : bin set 1 1 : bin set 2 216 0xd8 15:0 0 pixel counts for bin 0 and bin 1 7:0 pixel count for bin 0 (lowest values) divided window size, r215:2. 15:8 pixel count for bin 1 divided by window size, r215:2. histogram module uses luma after interpol ation. no color correction or gamma is applied. digital gains and first black level are applied. this register may not be read out when image port ion containing histogram window is being output. there are two bin sets which could be read through registers 216 and 217, based on value of bit 13 in reg 215[2]. 217 0xd9 15:0 0x0002 pixel counts for bin 2 and bin 3 7:0 pixel count for bin 2 divided by g factor. 15:8 pixel count for bin 3 (highest values) divided by g factor. 240 0xf0 2:0 2 page register 0: sensor core 1: ifp page 1 2: ifp page 2 241 0xf1 15:0 0 bytewise address special address to perform 16-bit re ads and writes to the sensor in 8-bit chunks. see 8-bit write sequence on page 128. table 7: ifp registers, page 2 (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 54 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers jpeg indirect registers table 8: jpeg indirect registers (see registers 30 and 31, page 2) reg # bits default name 1 0x01 2:0 0 jpeg core register 1 1:0 0 ncol: number of color componentsC1. 2 0 re: when set, enables restart marker insertion into jpeg byte stream. 3 0x03 15:0 0 jpeg core register 3 C nrst re-start interval - 1. valid only when re in core register 1 is set. this register defines the number of mcus between restart markers. 4 0x04 7:0 0 jpeg core register 4 0 0 hd0: dc huffman table pointer for color component 0. 1 0 ha0: ac huffman table pointer for color component 0. 3:2 0 qt0: quantization table pointer for color component 0. 7:4 0 nblock0: number of 8 x 8 blocks1 for color component 0 in mcu. 5 0x05 7:0 0 jpeg core register 5 0 0 hd1: dc huffman table pointer for color component 1. 1 0 ha1: ac huffman table pointer for color component 1. 3:2 0 qt1: quantization table pointer for color component 1. 7:4 0 nblock1: number of 8 x 8 blocks1 for color component 1 in mcu. 6 0x06 7:0 0 jpeg core register 6 0 0 hd2: dc huffman table pointer for color component 2. 1 0 ha2: ac huffman table pointer for color component 2. 3:2 0 qt2: quantization table pointer for color component 2. 7:4 0 nblock2: number of 8 x 8 blocks1 for color component 2 in mcu. 7 0x07 7:0 0 jpeg core register 7 0 0 hd3: dc huffman table pointer for color component 3. 1 0 ha3: ac huffman table pointer for color component 3. 3:2 0 qt3: quantization table pointer for color component 3. 7:4 0 nblock3: number of 8 x 8 blocks1 for color component 3 in mcu. 8 0x08 15:0 0 jpeg core register8 C nmcu lsb low-order word of nmcu (nmcu = number of mcus contained in the image to be encoded minus 1). 9 0x09 9:0 0 jpeg core register9 C nmcu_msb high-order word of nmcu (nmcu = number of mcus contained in the image to be encoded minus 1). 128-511 0x080 - 0x1ff 13:0 0 jpeg quantization memory 0 - 63 : quantization table 0 64 - 127 : quantization table 1 128 - 191 : quantization table 2 192 - 255 : quantization table 3 256 - 319 : quantization table 4 320 - 383 : quantization table 5 512 - 895 0x200 - 0x37f 11:0 0 jpeg huffman memory 0 - 175 : ac huffman table 0 176 - 351 : ac huffman table 1 352 - 367 : dc huffman table 0 368 - 383 : dc huffman table 1
mt9d131_ds rev. j 5/15 en 55 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 1024 - 1407 0x400 - 0x43f 13:0 0 jpeg dct memory 64 x 14 dual-port ram is access ible to host and microcontrolle r indirectly for testing purposes. 1408 - 1471 0x440 - 0x47f 13:0 0 jpeg zigzag memory 0 64 x 14 dual-port ram is access ible to host and microcontrolle r indirectly for testing purposes. 1472 - 1535 0x480 - 0x4bf 13:0 0 jpeg zigzag memory 1 64 x 14 dual-port ram is access ible to host and microcontrolle r indirectly for testing purposes. table 8: jpeg indirect registers (see re gisters 30 and 31, page 2) (continued) reg # bits default name
mt9d131_ds rev. j 5/15 en 56 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers firmware driver variables table 9: drivers ids id varname description 0 reserved 1 seq sequencer 2ae auto exposure 3 awb auto white balance 4 fd flicker detection 5 reserved 6 reserved 7 mode mode 8 reserved 9jpeg jpeg 11 reserved 12C15 reserved driver extensions 16 reserved 17 sequencer extension 18 auto exposure extension 19 auto white balance extension 20 flicker detection extension 21 reserved 22 reserved 23 mode extension 24 reserved 25 jpeg extension 26 reserved 27C31 reserved
mt9d131_ds rev. j 5/15 en 57 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers sequencer table 10: driver variables ? sequencer driver (id = 1) offs name type default rw description 0 vmt void* 61547 rw reserved 2 mode uchar 0x0f rw set of 1-bit switches enabling various drivers and outdoor white balance option. writing 1 to a particular switch enables the corresponding driver or option. bit 0 : auto exposure driver (id = 2) bit 1 : reserved bit 2 : reserved bit 3 : reserved bit 4 : reserved bit 5 : option to force outdoor white balance settings if exposure value exceeds sharedparams.outdoorth threshold. bits 6:7 : reserved bit 7 : tbd 3 cmd uchar 0 rw command or program to execute 0 : run 1 : do preview 2 : do capture 3 : do standby 4 : do lock 5 : refresh 6 : refresh mode writing a positive value to this variable commands the sequencer to execute the corresponding program. the sequencer resets cmd to 0, executes the program, and then resumes running in its current state. 4 state uchar 3 r current state of sequencer 0 : initialize 1 : mode change to preview 2 : enter preview 3 : preview 4 : leave preview 5 : mode change to capture 6 : enter capture 7 : capture 8 : leave capture 9 : standby 5 stepmode uchar 0 rw step-by-step mode for sequencer bit 0 : step mode on/off (1 = on) bit 1 : 1 forces the sequencer to do next step 7 sharedparams.aecontbuff uchar 8 rw weighting factor determining to what extent ae driver averages luma over time in continuous ae mode. setting of 32 disables luma averagingonly current luma values are used. lower settings enable luma averaging. 8 sharedparams.aecontstep uchar 2 rw number of steps in which ae driver is expected to reach target brightness in continuous ae mode. 9 sharedparams.aefastbuff uchar 32 rw weighting factor determining to what extent ae driver averages luma over time in fast mode. setting of 32 disables luma averagingonly current luma values are used. lower settings enable luma averaging.
mt9d131_ds rev. j 5/15 en 58 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 10 sharedparams.aefaststep uchar 1 rw number of step s in which ae driver is expected to reach target brightness in fast ae mode. 11 sharedparams.awbcontbuff uchar 8 rw weighting factor determining to what extent awb driver averages luma over time in continuous awb mode. setting of 32 disables luma averagingonly current luma values are used. lower settings enable luma averaging. 12 sharedparams.awbcontstep uchar 2 rw number of step s in which awb driver is expected to reach target color balance in continuous awb mode. 13 sharedparams.awbfastbuff uchar 32 rw weighting fact or determining to what extent awb driver averages luma over time in fast mode. setting of 32 disables luma averagingonly current luma values are used. lower settings enable luma averaging. 14 sharedparams.awbfaststep uchar 1 rw number of step s in which awb driver is expected to reach target color balance in fast awb mode. 18 sharedparams.totalmaxframes uchar 30 rw number of frames after which every driver must time out. 20 sharedparams.outdoorth uchar 10 rw exposure value (ev) threshold. if current ev is above this threshold and bit 5 of seq.mode equals 1, awb driver is forced to choose color correction settings suitable for daylight color temperature of 6500 k. 21 sharedparams.llmode uchar 0x60 rw bit 0 : change interpolation threshold bit 1 : reduce color saturation bit 2 : reduce aperture correction bit 3 : increase aperture correction threshold bit 4 : enable y filter 22 sharedparams.llvirtgain1 uchar 0x51 rw minimum ll virtual gain. defined as (ae.virtgain/2 + ae.dgainae1/16 + ae.dgainae2/4). 23 sharedparams.llvirtgain2 uchar 0x5a rw maximum ll virtual gain. min. and max. ll virtual gains define when low-light parameters start and stop changing. 24 sharedparams.llsat1 uchar 128 rw maximum color sa turation for color correction matrix (128 means 100%). 25 sharedparams.llsat2 uchar 0 rw minimum color saturation 26 sharedparams.llinterpthresh1 uchar 16 rw minimum threshold for interpolation 27 sharedparams.llinterpthresh2 uchar 64 rw maximum threshold for interpolation 28 sharedparams.llapcorr1 uchar 2 rw maximum aperture correction 29 sharedparams.llapcorr2 uchar 0 rw minimum aperture correction 30 sharedparams.llapthresh1 uchar 8 rw minimum aperture correction threshold 31 sharedparams.llapthresh2 uchar 64 rw maximum aperture correction threshold 32 captureparams.mode uchar 0x00 rw capture mode bit 0 : reserved bit 1 : capture video bit 2 : reserved bit 3 : reserved bit 4 : ae on (video only) bit 5 : awb on (video only) bit 6 : hg on (video only) 33 captureparams.numframes uchar 3 rw number of frames captured in still capture mode table 10: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 59 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 34 previewparams[0].ae uchar 1 rw auto exposure configuration in previewenter state 0 : off 1 : fast settling 2 : manual 3 : continuous 4 : fast settling + metering 35 previewparams[0].fd uchar 0 rw flicker detection configuration in previewenter state 0 : off 1 : manual 2 : continuous 36 previewparams[0].awb uchar 1 rw auto white bala nce configuration in previewenter state 0 : off 1 : fast settling 2 : manual 3 : continuous 38 previewparams[0].hg uchar 1 rw histogram configuration in previewenter state 0 : off 1 : fast 2 : manual 3 : continuous 40 previewparams[0].skipframe uchar 0x00 rw bit 7 : 1 means turn off frame enable bit 6 : 1 means skip state bit 5 : 1 means skip first frame when led on 41 previewparams[1].ae uchar 3 rw auto expo sure configuration in preview state 0 : off 1 : fast settling 2 : manual 3 : continuous 4 : fast settling + metering 42 previewparams[1].fd uchar 2 rw flicker detection configuration in preview state 0 : off 1 : manual 2 : continuous 43 previewparams[1].awb uchar 3 rw auto white balance configuration in preview state 0 : off 1 : fast settling 2 : manual 3 : continuous 45 previewparams[1].hg uchar 3 rw histogram configuration in preview state 0 : off 1 : fast 2 : manual 3 : continuous 47 previewparams[1].skipframe uchar 0x00 rw bit 7 : 1 means turn off frame enable bit 6 : 1 means skip state bit 5 : 1 means skip first frame when led on table 10: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 60 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 48 previewparams[2].ae uchar 4 rw auto exposure configuration in previewleave state 0 : off 1 : fast settling 2 : manual 3 : continuous 4 : fast settling + metering 49 previewparams[2].fd uchar 0 rw flicker detection configuration in previewleave state 0 : off 1 : manual 2 : continuous 50 previewparams[2].awb uchar 1 rw auto white balance configuration in previewleave state 0 : off 1 : fast settling 2 : manual 3 : continuous 52 previewparams[2].hg uchar 1 rw histogram configuration in previewleave state 0 : off 1 : fast 2 : manual 3 : continuous 54 previewparams[2].skipframe uchar 0x00 rw bit 7 : 1 means turn off frame enable bit 6 : 1 means skip state bit 5 : 1 means skip first frame when led on 55 previewparams[3].ae uchar 0 rw auto exposure configuration in captureenter state 0 : off 1 : fast settling 2 : manual 3 : continuous 4 : fast settling + metering 56 previewparams[3].fd uchar 0 rw flicker detection configuration in captureenter state 0 : off 1 : manual 2 : continuous 57 previewparams[3].awb uchar 0 rw auto white bala nce configuration in captureenter state 0 : off 1 : fast settling 2 : manual 3 : continuous 59 previewparams[3].hg uchar 0 rw histogram configuration in captureenter state 0 : off 1 : fast 2 : manual 3 : continuous 61 previewparams[3].skipframe uchar 0x00 rw bit 7 : 1 means turn off frame enable bit 6 : 1 means skip state bit 5 : 1 means skip first frame when led on table 10: driver variables ? sequencer driver (id = 1) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 61 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers auto exposure table 11: driver variables ? auto exposure driver (id = 2) offs name type default rw description 0 vmt void* 59518 rw reserved 2 windowpos uchar 0 rw position of uppe r left corner of first ae window bits [3:0] : x0 in units of 1/16 of frame width bits [7:4] : y0 in units 1/16 of frame height new position written to this variable takes effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 3 windowsize uchar 0xef rw dimensions of 4 x 4 array of ae windows bits [3:0] : width (in units of 1/16 of frame width) decremented by 1 bits [7:4] : height (in units of 1/16 of frame height) decremented by 1 new dimensions written to this variable take effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 4 wakeupline uint r number of image row at which mcu wakes up to do ae calculations. this number is automatically adjusted after each change of the position and dimensions of the ae windows. 6 target uchar 60 rw target brightness 7 gate uchar 10 rw ae sensitivity 8 skipframes uchar 0 rw frequency of ae updates 9 jumpdivisor uchar 2 rw factor reducing exposure jumps (1 = fastest jumps) 10 lumabufferspeed uchar 8 rw speed of buffer ing (32 = fastest, 1 = slowest) 11 maxr12 uint 1200 rw maximum value of r12:0 (shutter delay) 13 minindex uchar 0 rw minimum allowed zone number (that is minimum integration time) 14 maxindex uchar 24 rw maximum allowed zone number (that is maximum integration time) 15 minvirtgain uchar 16 rw minimum allowed virtual gain 16 maxvirtgain uchar 128 rw maximum allowed virtual gain 17 maxadchi uchar 13 rw maximum adc vref_hi setting 18 minadchi uchar 11 rw minimum adc vref_hi setting 19 minadclo uchar 7 rw minimum adc vref_lo setting 20 maxdgainae1 uint 128 rw maximum digital gain pre-lc 22 maxdgainae2 uchar 32 rw maximum digital gain post-lc 23 indexth23 uchar 8 rw zone number to start gain increase in low-light. sets frame rate at normal illumination. 24 maxgain23 uchar 120 rw maximum gain to increase in low-light before dropping frame rate. sets frame rate at low-light. 25 weights uchar 0xff rw bits [7:4] : background weight bits [3:0] : center zone weight
mt9d131_ds rev. j 5/15 en 62 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 26 status uchar 192 rw ae status bit 0 : 1 if ae reached the limit bit 1 : 1 if r9 is changed (need to skip frame) bit 2 : ready bit 3 : do metering mode bit 4 : metering mode is done bit 6 : on/off overexpose fit bit 7 : o n/off overexpose compensation 27 currenty uchar r last measured luminance 28 r12 uint rw current shutter delay value 30 index uchar r current zone (integration time) 31 virtgain uchar rw current virtual gain 32 adc_hi uchar r current adc v ref _ hi value 33 adc_lo uchar r current adc v ref _ lo value 34 dgainae1 uint rw current digital gain pre-lc 36 dgainae2 uchar rw current digital gain post-lc 37 r9 uint rw current r9:0 value (integration time) 39 r65 uchar rw current adc v ref values 40 rowtime uint 531 rw row time divided by 4 (in master clock periods) 42 gainr12 uchar 128 r gain compensating too low maxr12 (128 = unit gain) 43 skipframes_cnt uchar r counter of skipped frames 44 bufferedluma uint r current time-buffered measured luma 46 dirae_prev uchar r previous state of ae 47 r9_step uint 157 rw integration time of one zone 50 maxadclo uchar r maximum adc vref_lo setting 51 physgainr uint r physical (analog) r gain 53 physgaing uint r physical (analog) g gain 55 physgainb uint r physical (analog) b gain 82 mmevzone1 uchar 16 rw ev threshold for scenes containing the sun 83 mmevzone2 uchar 12 rw ev threshold for bright outdoor scenes 84 mmevzone3 uchar 8 rw ev threshold for indoor or outdoor twilight scenes 85 mmevzone4 uchar 2 rw ev threshold for night scenes 86 mmshiftev uchar 13 rw exposure value shift. adjust this value for given lens. 87 numoe uchar r number of overexposed zones table 11: driver variables ? auto exposure driver (id = 2) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 63 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers auto white balance table 12: driver variables ? auto white balance (id = 3) offs name type default rw description 0 vmt void* 59731 rw reserved 2 windowpos uchar 0rw position of upper left corner of awb window bits [3:0] : x0 in units of 1/16 of frame width bits [7:4] : y0 in units 1/16 of frame height new position written to this variable takes effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 3 windowsize uchar 0xef rw dimensions of awb window bits [3:0] : width (in units of 1/16 of frame width) decremented by 1. bits [7:4] : height (in units of 1/16 of frame height) decremented by 1. new dimensions written to this variable take effect only after refresh_mode command is given to the sequencer (seq.cmd is set to 6). 4 wakeupline uint r number of image row at which mcu wakes up to perform awb calculations. this number is automatically adjusted after each change of the position and dimensions of the awb window. 6 ccml[0] int 0x0219 rw left color correction matrix elemen t k11. value is encoded in signed twos complement form; 256 means 1.0. new values written to awb.ccml array take effect only after refresh command is given to the sequencer (seq.cmd is set to 5). 8 ccml[1] int 0xfeec rw left color correction matrix element k12 10 ccml[2] int 0xffff rw left color correction matrix element k13 12 ccml[3] int 0xff6a rw left color correction matrix element k21 14 ccml[4] int 0x01d4 rw left color correction matrix element k22 16 ccml[5] int 0xffc9 rw left color correction matrix element k23 18 ccml[6] int 0xff71 rw left color correction matrix element k31 20 ccml[7] int 0xfdd3 rw left color correction matrix element k32 22 ccml[8] int 0x03ed rw left color correction matrix element k33 24 ccml[9] int 0x0020 rw left color correction matrix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 26 ccml[10] int 0x0035 rw left color correction matrix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 28 ccmrl[0] int 0xff92 rw delta color correction matrix element d11. value is encoded in signed twos complement form; 256 means 1.0. new values written to awb.ccmrl array take effect only after refresh command is given to the sequencer (seq.cmd is set to 5). 30 ccmrl[1] int 0x0098 rw delta color correction matrix element d12 32 ccmrl[2] int 0xffe1 rw delta color correction matrix element d13 34 ccmrl[3] int 0x0014 rw delta color correction matrix element d21 36 ccmrl[4] int 0xfffc rw delta color correction matrix element d22 38 ccmrl[5] int 0xfff2 rw delta color correction matrix element d23 40 ccmrl[6] int 0x004e rw delta color correction matrix element d31 42 ccmrl[7] int 0x0148 rw delta color correction matrix element d32 44 ccmrl[8] int 0xfe3f rw delta color correction matrix element d33
mt9d131_ds rev. j 5/15 en 64 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 46 ccmrl[9] int 0x000a rw delta color correction matrix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 48 ccmrl[10] int 0xfff1 rw delta color correction matrix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 50 ccm[0] int rw current color correction matrix element c11. value is stored in signed twos complement form; 256 means 1.0. 52 ccm[1] int rw current color correction matrix element c12 54 ccm[2] int rw current color correction matrix element c13 56 ccm[3] int rw current color correction matrix element c21 58 ccm[4] int rw current color correction matrix element c22 60 ccm[5] int rw current color correction matrix element c23 62 ccm[6] int rw current color correction matrix element c31 64 ccm[7] int rw current color correction matrix element c32 66 ccm[8] int rw current color correction matrix element c33 68 ccm[9] int rw current color correction matrix red/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 70 ccm[10] int rw current color correction matrix blue/green gain ratio. value is interpreted as unsigned; 32 means 1.0. 72 gainbufferspeed uchar 8 rw speed of time-buffe ring (32 = fastest, 1 = slowest) 73 jumpdivisor uchar 2 rw derating factor for white balance changes (1 = fastest changes) 74 gainmin uchar 83 rw minimum allowed awb digital gain (128 means 1.0) 75 gainmax uchar 192 rw maximum allowed awb digital gain (128 means 1.0) 76 gainr uchar r current r digital gain (128 means1.0) 77 gaing uchar r current g digital gain (128 means1.0) 78 gainb uchar r current b digital gain (128 means 1.0) 79 ccmpositionmin uchar 0 rw leftmost position of color correction matrix (corresponding to incandescent light) 80 ccmpositionmax uchar 127 rw rightmost position of color correction matrix (corresponding to daylight) 81 ccmposition uchar 64 rw current position of color correction matrix (0 corresponds to incandescent light, 127 to daylight) 82 saturation uchar 128 rw saturation of color correction matrix (128 means 100%) 83 mode uchar 0 rw bit 0 : 1 = awb is in steady state bit 1 : 1 = limits are reached bit 2 : 1 = reserved bit 3 : 1 = debug bit 4 : 1 = no awb statistic bit 5 : 1 = force awb dgains to unit; program value into awb.ccmposition to manually set matrix position bit 6 : 1 = disable ccm normalization bit 7 : 1 = force outdoor settings, set by the sequencer 84 gainr_buf uint 0x1000 rw time-buffered r gain (0x1000 means 1.0) 86 gainb_buf uint 0x1000 rw time-buffered b gain (0x1000 means 1.0) 88 sumr uchar r awb statistics (normalized to an arbitrary number) 89 sumy uchar r awb statistics (normalized to an arbitrary number) 90 sumb uchar r awb statistics (normalized to an arbitrary number) table 12: driver variables ? auto white balance (id = 3) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 65 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 91 steadybgainoutmin uchar 115 rw blue gain min. threshold to start search. when the blue gain falls below this threshold, the awb driv er starts searching for new color correction matrix position. threshold setting of 128 corresponds to gain of 1.0; higher setting means higher gain. 92 steadybgainoutmax uchar 140 rw blue gain max. threshold to start search. when the blue gain goes above this threshold, the awb driver starts searching for new color correction matrix position. threshold setting of 128 corresponds to gain of 1.0; higher setting means higher gain. 93 steadybgaininmin uchar 124 rw blue gain min. threshold to end search. when the blue gain is between awb.steadybgaininmin and awb.steadybgaininmax, the awb driver maintains current color correction matrix position. threshold setting of 128 corresponds to gain of 1.0; higher setting means higher gain. 94 steadybgaininmax uchar 131 rw blue gain max. threshold to end search. see awb.steadybgaininmin above. 95 cntpxlth uint 100 rw reserved 97 tg_min0 uchar 226 rw reserved 98 tg_max0 uchar 246 rw reserved 99 xo 16 rw ccm position threshold between day and incandescent normalization coefficients. 100 kr_l uchar 170 rw ccm red row normalization coefficient for left matrix position (128 - minimal number) 101 kg_l uchar 150 rw ccm green row normalization coefficien t for left matrix position (128 - minimal number) 102 kb_l uchar 128 rw ccm blue row normalization coefficient for left matrix position (128 - minimal number) 103 kr_r uchar 128 rw ccm red row normalization coefficient for right matrix position (128 - minimal number) 104 kg_r uchar 128 rw ccm green row normalization coefficient for right matrix position (128 - minimal number) 105 kb_r uchar 128 rw ccm blue row normalization coefficient for right matrix position (128 - minimal number) table 12: driver variables ? auto white balance (id = 3) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 66 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers flicker detection table 13: driver variables ? flicker detection driver (id = 4) offs name type default rw description 0 vmt void* 59884 rw reserved 2 windowposh uchar 29 rw width of flicker measurement window and position of its left boundary x0 bits [3:0] : width (in units of 1/16 of frame width) decremented by 1 bits [7:4] : x0 (in the same units as the width) at the beginning of each flicker measurement, the top boundary (y0) of the flicker me asurement window is set at row 64. average luminance in the window is measured by the ifp measurement engine and stored in fd.buffer[0]. then y0 is incremented by fd.windowheight and the buffer index by 1. by repeating these steps 47 times, the entire fd.buffer is filled with average luminance values from a vertical array of 48 equal-size windows. 3 windowheight uchar 4 rw bits [5:0] : flicker measurement window height in rows 4 mode uchar 0 rw mode switches and indicators bit 7 : 1 enables manual mode, 0 disables it bit 6 : 0 selects 60hz settings for manual mode, 1 selects 50hz settings bit 5 : read-only, indicates current settings (0C60hz, 1C50hz) bit 4 : 1 enables debug mode, 0 disables it bits [3:0] : read-only, reserved for auto fd 5 wakeupline uint 64 r number of image row at whi ch mcu wakes up to perform flicker detection. changing the value of fd.wakeupline has no effect on the functioning of the fd driver, because it does not use this variable. it simply sets it to 64 at initialization, to indicate the top of the flicker measurement area. see fd.windowposh above. 7 smooth_cnt uchar 5 rw reserved 8 search_f1_50 uchar 30 rw lower limit of period range of interest in 50hz flicker detection. if the fd driver is searching for 50hz flicker and detects in a frame a flicker-like signal whose period in rows is between fl.search_f1_50 and fl.search_f2_50, it counts the frame as one containing flicker. 9 search_f2_50 uchar 32 rw upper limit of period range of inte rest in 50hz flicker detection. see fd.search_f1_50 above. 10 search_f1_60 uchar 37 rw lower limit of period range of interest in 60hz flicker detection. if the fd driver is searching for 60hz flicker and detects in a frame a flicker-like signal whose period in rows is between fl.search_f1_60 and fl.search_f2_60, it counts the frame as one containing flicker. 11 search_f2_60 uchar 39 rw upper limit of period range of inte rest in 60hz flicker detection. see fd.search_f1_60 above. 12 skipframe uchar 0 rw skip frame before subtracting two frames. 13 stat_min uchar 3rw flicker is considered detected if fd.stat_min out of fd.stat_max consecutive frames contain flicker (periodic signal of sought frequency).
mt9d131_ds rev. j 5/15 en 67 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 14 stat_max uchar 5 rw see fl.stat_min. 15 stat uchar r reserved 16 minamplitude uchar 5 rw reserved 17 r9_step60 uint 157 rw minimal shutter width step for 60hz ac 19 r9_step50 uint 188 rw minimal shutter width step for 50hz ac 21 buffer[48] uchar[48] r reserved table 13: driver variables ? flicker detection driver (id = 4) (continued) offs name type default rw description
mt9d131_ds rev. j 5/15 en 68 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers context table 14: driver variables ? mode/context driver (id = 7) offs name type assoc.h/w reg rw default description 0 vmt pointer uint local rw 59871 pointer to virtual method table. 2 context uchar local rw 0 current context (0 = a, 1 = b). 3 output width_a uint r0x16:1 rw 800 output size of final image for context a. must be equal to or smaller than crop dimension. 5 output height_a uint r0x17:1 rw 600 output size of final image for context a. must be equal to or smaller than crop dimension. 7 output width_b uint r0x16:1 rw 1600 output size of final image for context b. must be equal to or smaller than crop dimension. 9 output height_b uint r0x17:1 rw 1200 output size of final image for context b. must be equal to or smaller than crop dimension. 11 mode_config uint r0xa:2 rw 0x10 bit 4 : jpg bypass: context a. bit 5 : jpg bypass: context b. set to 0 to enable jpeg. 13 pll_lock_delay uint local rw 200 delay between pll enable and start of microcontroller operation (no. of clock cycles x 100). 15 s_row_start_a uint r0x01:0 rw 28 first sensor-readout row (context a shadow register). 17 s_col_start_a uint r0x02:0 rw 60 first sensor-readout column (context a shadow register). 19 s_row_height_a uint r0x03:0 rw 1200 number of sensor-readout rows (context a shadow register). 21 s_col_width_a uint r0x04:0 rw 1600 number of sensor-readout columns (context a shadow register). 23 s_ext_delay_a uint r0x0b:0 rw 0 extra sensor delay per frame (context a shadow register). 25 s_row_speed_a uint r0x0a:0 rw 1 row speed (context a shadow register). 27 s_row_start_b uint r0x01:0 rw 28 first sensor-readout row (context b shadow register). 29 s_col_start_b uint r0x02:0 rw 60 first sensor-readout column (context b shadow register). 31 s_row_height_b uint r0x03:0 rw 1200 number of sensor-readout rows (context b shadow register). 33 s_col_width_b uint r0x04:0 rw 1600 number of sensor-readout columns (context b shadow register). 35 s_ext_delay_b uint r0x0b:0 rw 1050 extra sensor delay per frame (context b shadow register). 37 s_row_speed_b uint r0x0a:0 rw 1 row speed (context b shadow register). 39 crop_x0_a uint r0x11:1 rw 0 lower-x decimator zoom window (context a shadow register). 41 crop_x1_a uint r0x12:1 rw 800 upper-x decimator zoom window (context a shadow register). 43 crop_y0_a uint r0x13:1 rw 0 lower-y decimator zoom window (context a shadow register).
mt9d131_ds rev. j 5/15 en 69 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 45 crop_y1_a uint ir0x14:1 /w 600 upper-y decimator zoom window (context a shadow register). 47 dec_ctrl_a uint r0x15:1 r/ w 0 decimator control register (context a shadow register). 53 crop_x0_b uint r0x11:1 rw 0 lower-x decimator zoom window (context b shadow register). 55 crop_x1_b uint r0x12:1 rw 1600 upper-x decimator zoom window (context b shadow register) 57 crop_y0_b uint r0x13:1 rw 0 lower-y decimator zoom window (context b shadow register). 59 crop_y1_b uint r0x14:1 rw 1200 upper-y decimator zoom window (context b shadow register). 61 dec_ctrl_b uint r0x15:1 rw 0 decimator control register (context b shadow register). 67 gam_cont_a uchar local rw 0x42 gamma and contrast settings (context a shadow register) gamma setting: bits 0:2: 0 : gamma = 1.0 1 : gamma = 0.56 2 : gamma = 0.45 3 : use user-defined gamma table contrast setting: bits 4:6: 0 : no contrast increase (slope = 100%) 1 : some contrast increase (slope = 125%) 2 : more contrast increase (slope = 150%) 3 : most contrast increase (slope = 175%) 4 : noise-reduction contrast 68 gam_cont_b uchar local rw 0x42 gamma and contrast settings (context b shadow register) gamma setting: bits 0:2: 0 : gamma = 1.0 1 : gamma = 0.56 2 : gamma = 0.45 3 : use user-defined gamma table contrast setting: bits 4:6: 0 : no contrast increase (slope = 100%) 1 : some contrast increase (slope = 125%) 2 : more contrast increase (slope = 150%) 3 : most contrast increase (slope = 175%) 4 : noise-reduction contrast 69 gamma_table_a_0 uchar r0xb2:1[7:0] rw 0 user-defined gamma table values (context a shadow register). 70 gamma_table_a_1 uchar r0xb2:1[15:8] rw 39 user-defined gamma table values (context a shadow register). 71 gamma_table_a_2 uchar r0xb3:1[7:0] rw 53 user-defined gamma table values (context a shadow register). 72 gamma_table_a_3 uchar r0xb3:1[15:8] rw 72 user-defined gamma table values (context a shadow register). 73 gamma_table_a_4 uchar r0xb4:1[7:0] rw 99 user-defined gamma table values (context a shadow register). table 14: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description
mt9d131_ds rev. j 5/15 en 70 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 74 gamma_table_a_5 uchar r0xb4:1[15:8] rw 119 user-defined gamma table values (context a shadow register). 75 gamma_table_a_6 uchar r0xb5:1[7:0] rw 136 user-defined gamma table values (context a shadow register). 76 gamma_table_a_7 uchar r0xb5:1[15:8] rw 150 user-defined gamma table values (context a shadow register). 77 gamma_table_a_8 uchar r0xb6:1[7:0] rw 163 user-defined gamma table values (context a shadow register). 78 gamma_table_a_9 uchar r0xb6:1[15:8] rw 175 user-defined gamma table values (context a shadow register). 79 gamma_table_a_10 uchar r0xb7:1[7:0] rw 186 user-defined gamma table values (context a shadow register). 80 gamma_table_a_11 uchar r0xb7:1[15:8] rw 196 user-defined gamma table values (context a shadow register). 81 gamma_table_a_12 uchar r0xb8:1[7:0] rw 206 user-defined gamma table values (context a shadow register). 82 gamma_table_a_13 uchar r0xb8:1[15:8] rw 215 user-defined gamma table values (context a shadow register). 83 gamma_table_a_14 uchar r0xb9:1[7:0] rw 224 user-defined gamma table values (context a shadow register). 84 gamma_table_a_15 uchar r0xb9:1[15:8] rw 232 user-defined gamma table values (context a shadow register). 85 gamma_table_a_16 uchar r0xba:1[7:0] rw 240 user-defined gamma table values (context a shadow register). 86 gamma_table_a_17 uchar r0xba:1[15:8] rw 248 user-defined gamma table values (context a shadow register). 87 gamma_table_a_18 uchar r0xbb:1[7:0] rw 255 user-defined gamma table values (context a shadow register). 88 gamma_table_b_0 uchar r0xb2:1[7:0] rw 0 user-defined gamma table values (context b shadow register). 89 gamma_table_b_1 uchar r0xb2:1[15:8] rw 39 user-defined gamma table values (context b shadow register). 90 gamma_table_b_2 uchar r0xb3:1[7:0] rw 53 user-defined gamma table values (context b shadow register). 91 gamma_table_b_3 uchar r0xb3:1[15:8] rw 72 user-defined gamma table values (context b shadow register). 92 gamma_table_b_4 uchar r0xb4:1[7:0] rw 99 user-defined gamma table values (context b shadow register). 93 gamma_table_b_5 uchar r0xb4:1[15:8] rw 119 user-defined gamma table values (context b shadow register). 94 gamma_table_b_6 uchar r0xb5:1[7:0] rw 136 user-defined gamma table values (context b shadow register). 95 gamma_table_b_7 uchar r0xb5:1[15:8] rw 150 user-defined gamma table values (context b shadow register). 96 gamma_table_b_8 uchar r0xb6:1[7:0] rw 163 user-defined gamma table values (context b shadow register). 97 gamma_table_b_9 uchar r0xb6:1[15:8] rw 175 user-defined gamma table values (context b shadow register). table 14: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description
mt9d131_ds rev. j 5/15 en 71 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers 98 gamma_table_b_10 uchar r0xb7:1[7:0] rw 186 user-defined gamma table values (context b shadow register). 99 gamma_table_b_11 uchar r0xb7:1[15:8] rw 196 user-defined gamma table values (context b shadow register). 100 gamma_table_b_12 uchar r0xb8:1[7:0] rw 206 user-defined gamma table values (context b shadow register). 101 gamma_table_b_13 uchar r0xb8:1[15:8] rw 215 user-defined gamma table values (context b shadow register). 102 gamma_table_b_14 uchar r0xb9:1[7:0] rw 224 user-defined gamma table values (context b shadow register). 103 gamma_table_b_15 uchar r0xb9:1[15:8] rw 232 user-defined gamma table values (context b shadow register). 104 gamma_table_b_16 uchar r0xba:1[7:0] rw 240 user-defined gamma table values (context b shadow register). 105 gamma_table_b_17 uchar r0xba:1[15:8] rw 248 user-defined gamma table values (context b shadow register). 106 gamma_table_b_18 uchar r0xbb:1[7:0] rw 255 user-defined gamma table values (context b shadow register). 107 fifo_config0_a uint r0x0d:2 rw 0x0027 fifo buffer configuration 0 (context a shadow register). 109 fifo_config1_a uint r0x0e:2 rw 0x0002 fifo buffer configuration 1 (context a shadow register). 111 fifo_config2_a uchar r0x0f:2 rw 0x21 fifo buffer configuration 2 (context a shadow register). 112 fifo_len_timing_a uint r0x12:2 rw 0x0606 fifo spoof frame line timing (context b shadow register). 114 fifo_config0_b uint r0x0d:2 rw 0x0067 fifo buffer configuration 0 (context b shadow register). 116 fifo_config1_b uint r0x0e:2 rw 0x050a fifo buffer configuration 1 (context b shadow register). 118 fifo_config2_b uchar r0x0f:2 rw 0x0003 fifo buffer configuration 2 (context b shadow register). 119 fifo_len_timing_b uint r0x12:2 rw 0x0606 fifo spoof frame line timing (context b shadow register). 121 spoof_width_b uint r0x10:2* rw 1600 fifo spoof frame line timing (context b shadow register). *if in uncompressed mode, 2x this value is uploaded to r0x10. 123 spoof_height_b uint r0x11:2 rw 600 fifo spoof frame line timing (context b shadow register). 125 out_format_a uchar r0x97:1 rw 0 output format config. (context a shadow register). 126 out_format_b uchar r0x97:1 rw 0 output format config. (context b shadow register). 127 spec_effects_a uint r0xa4:1 rw 0x6440 special effects selection (context a shadow register). 129 spec_effects_b uint r0xa4:1 rw 0x6440 special effects selection (context b shadow register). table 14: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description
mt9d131_ds rev. j 5/15 en 72 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor jpeg indirect registers jpeg 131 y_rgb_offset_a uchar r0xbf:1 rw 0 y/rgb offset setting (context a shadow register). 132 y_rgb_offset_b uchar r0xbf:1 rw 0 y/rgb offs et setting (context b shadow register). table 15: driver variables ? jpeg driver (id = 9) offs name type def rw description 0 vmt void* 58451 rw reserved. 2 width uint 1600 r image width (see mode.output_width). 4 height uint 1200 r image height (see mode.output_height). 6 format uchar 0rw image format: 0 : ycbcr 4:2:2 1 : ycbcr 4:2:0 2 : monochrome 7 config uchar 52 rw configuration and handshaking: bit 0 : if 1, video; if 0, still snapshot bit 1 : enable handshaking with host at every error frame bit 2 : enable retry after an unsuccessful encode or transfer bit 3 : host indicates it is ready for next frame bit 4 : enable scaled quantization table generation bit 5 : enable auto-select quantization table bit 7:6 : quantization table id 8 restartint uint 0rw restart marker interval: 0 = restart marker is disabled 10 qscale1 uchar 6rw bit 6:0 : scaling factor for first set of quantization tables bit 7 : 1, new scaling factor value 11 qscale2 uchar 9rw bit 6:0 : scaling factor for second set of quantization tables bit 7 : if 1, new scaling factor value 12 qscale3 uchar 12 rw bit 6:0 : scaling factor for third set of quantization tables bit 7 : if 1, new scaling factor value 13 timeoutframes uchar 10 rw number of frames to time out when host is not responding (setting bit 3 of config) to an unsuccessful jp eg frame while bit 1 of config is set. 14 state uchar 0 r jpeg driver state. 15 datalengthmsb uchar r bit [23:16] of previous frame jpeg data length. 16 datalengthlsbs uint r bit [15:0] of previous frame jpeg data length. table 14: driver variables ? mode/context driver (id = 7) (continued) offs name type assoc.h/w reg rw default description
mt9d131_ds rev. j 5/15 en 73 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing output format and timing yuv/rgb uncompressed output uncompressed yuv or rgb data can be output either directly from the output format- ting block or through a fifo buffer with a ca pacity of 1,600 bytes, enough to hold one half uncompressed line at full resolution. buffe ring of data is a way to equalize the data output rate when image decimation is used. decimation produces an intermittent data stream consisting of short hi gh-rate bursts separated by idle periods. figure 6 depicts such a stream. high pixel clock frequency during bursts may be undesirable due to emi concerns. figure 6: timing of decimated un compressed output bypassing the fifo figure 7 depicts the output timing of unco mpressed yuv/rgb when a decimated data stream is equalized by buffering or when no decimation takes place. the pixel clock frequency remains constant during each li ne_valid high period. decimated data are output at a lower frequenc y than full size frames, which helps to reduce emi. figure 7: timing of uncompressed full frame ou tput or decimated output passing through the fifo timing details of uncompressed yuv/rgb output are shown in figure 8 on page 74. frame_valid line_valid pixclk line_valid d out bt.601 code pixel data pixel data bt.601 code frame_valid line_valid pixclk d out [7:0]
mt9d131_ds rev. j 5/15 en 74 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing figure 8: details of uncomp ressed yuv/rgb output timing uncompressed yuv/rgb data ordering the mt9d131 supports swapping ycrcb mode, as illustrated in table 16. the rgb output data ordering in default mode is shown in table 17. the odd and even bytes are swapped when luma/chroma swap is enabled. r and b channels are bit-wise swapped when chroma swap is enabled. symbol definition conditions min max units f pixclk pixclk frequency default 80 mhz t pd pixclk to data valid default -3 3 ns t pfh pixclk to fv high default -3 3 ns t plh pixclk to lv high default -3 3 ns t pfl pixclk to fv low default -3 3 ns t pll pixclk to lv low default -3 3 ns table 16: ycrcb output data ordering mode default (no swap) cb i y i cr i y i+1 swapped crcb cr i y i cb i y i+1 swapped yc y i cb i y i+1 cr i swapped crcb, yc y i cr i y i+1 cb i table 17: rgb ordering in default mode mode (swap disabled) byte d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 565rgb odd r 7 r 6 r 5 r 4 r 3 g 7 g 6 g 5 even g 4 g 3 g 2 b 7 b 6 b 5 b 4 b 3 555rgb odd 0 r 7 r 6 r 5 r 4 r 3 g 7 g 6 even g 4 g 3 g 2 b 7 b 6 b 5 b 4 b 3 444xrgb odd r 7 r 6 r 5 r 4 g 7 g 6 g 5 g 4 even b 7 b 6 b 5 b 4 0 0 0 0 x444rgb odd 0 0 0 0 r 7 r6 6 r 5 r 4 even g 7 g 6 g 5 g 4 b 7 b 6 b 5 b 4 pixclk data[7:0] frame_valid/ line_valid xxx xxx xxx xxx xxx xxx note: frame_valid leads line_valid by 6 pixclks. note: frame-valid trails line_valid by 6 pixclks. t pfl t pll t pd t pd t pfh t plh pxl_0 pxl_1 pxl_2 pxl_n
mt9d131_ds rev. j 5/15 en 75 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing uncompressed 10-bit bypass output raw 10-bit bayer data from the sensor core can be output in bypass mode by using the eight output signals (d out [7:0]) in a special 8 + 2 data format, as shown in table 18. the timing of 10-bit or 8-bit data stream ou tput in the bypass mode is qualitatively the same as that depicted in figure 7. figure 9: example of timing for non-decima ted uncompressed output bypassing output fifo jpeg compressed output jpeg compression of if p output produces a data stream whose structure differs from that of an uncompressed yuv/rgb stream. fr ames are no longer sequences of lines of constant length. this differenc e is reflected in the timing of the line_valid signal. when jpeg compression is enabled, logical highs on line_valid do not correspond to image lines, but to vari ably sized packets of valid data. in other words, the line_valid signal is in fact a data_valid signal. it is a good analogy to compare the jpeg output of the mt9d131 to an 8-bit parallel data port wherein the line_valid signal indicates valid data and the frame_valid signal indicates frame timing. the jpeg compressed data can be output eith er continuously or in blocks simulating image lines. the latter output scheme is intended to spoof a standard video pixel port connected to the mt9d131 and for that purpose treats jpeg entropy-coded segments as if they were standard video pixels. in the continuous output mode, jpeg output clock can be free-running or gated. in all, three timing modes are available and are depicted in figure 10 on page 77, figure 11 on page 77, and figure 12 on page 77. these timing diagrams are merely three typical examples of many variations of jpeg output. descrip- tion of output configuration register r0xd :2 in table 7, ?ifp registers, page 2,? on page 43 provides more information on differe nt output interface configuration options. the ?continuous? and spoof jpeg output mo des differ primarily in how the line_valid output is asserted. in the continuous mode, line_valid is asserted only during output clock cycles containing valid jpeg data. the resulting line_valid signal pattern is non- table 18: 2-byte rgb format odd bytes 8 data bits d 9 d 8 d 7 d 6 d 5 d 4 d 3 d 2 even bytes 2 data bits + 6 unused bits 0 0 0 0 0 0 d 1 d 0 0xff 0x00 0x00 0xab 0xff 0x00 0x00 0x80 cb 0 y 0 cr 0 y 1 cb 0 y 0 cr 0 y 1 0xff 0x00 0x00 0x9d 0xff 0x00 0x00 0xb6
mt9d131_ds rev. j 5/15 en 76 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing uniform and highly image-dependent, reflec ting the inherent nature of jpeg data stream. in the spoof mode, line_valid is as serted and de-asserted in a more uniform pattern emulating uncompressed video output with horizontal blanking intervals. when line_valid is de-asserted, available jpeg da ta are not output, but instead remain in the fifo until line_valid is asserted agai n. during the time when line_valid is asserted, the output clock is gated off whenever there is no valid jpeg data in the fifo. note: as a result, spoof ?lines? containing the sa me number of valid data bytes may be out- put within different time intervals dependin g on constantly varying jpeg data rate. the host processor configures the spoof pa ttern by programming the total number of line_valid assertion intervals, as well as the number of output clock periods during and between line_valid assertions. in othe r words, the host processor can define a temporal ?frame? for jpeg output, preferably with ?size? tailored to the expected jpeg file size. if this frame is too large for the to tal number of jpeg bytes actually produced, the mt9d131 either de-asserts frame_valid or continues to pad unused ?lines? with zeros until the end of the frame. if the frame is too small, the mt9d131 either continues to output the excess jpeg bytes until the en tire jpeg compressed image is output or discards the excess jpeg bytes and sets an erro r flag in a status regi ster accessible to the host processor. in the continuous output mode, the jpeg outp ut clock can be configured to be either gated off or running while line_valid is de -asserted. to save extra power, the jpeg output clock can also be gated off between frames (when frame_valid is de-asserted) in both continuous and spoof output mode. in the continuous output mode, there is an option to insert jpeg soi (0xffd8) and eo i (0xffd9) markers respectively before and after valid jpeg data. soi and eoi can be inserted either inside or outside the frame_valid assertion period, but always outside line_valid assertions. the output order of even and odd bytes of jp eg data can be swapped in the spoof output mode. this option is not supp orted in the continuous mode. output clock speed can optionally be made to vary according to the fullness of the fifo, to reduce the likelihood of fifo overflow. wh en this option is enabled, the output clock switches at three fixed levels of fifo fullness (25 percent, 50 percent, and 75 percent) to a higher or lower frequency, depending on th e direction of fullness change. the set of possible output clock frequencies is restricted by the fact that its period must be an integer multiple of the master clock period. the frequencies to be used are chosen by programming three output clock frequency divisors in registers r0xe:2 and r0xf:2. divisor n1 is used if the fifo is less than 50 percent full and last fullness threshold crossed has been 25 percent. when the fifo reaches 50 percent and 75 percent fullness, the output clock switches to divisor n2 and n3, respectively. when the fifo fullness level drops to 50 percent and 25 percent, the output clock is switched back to divisor n2 and n1, respectively. the host processor can read registers containing jpeg status flags and jpeg data length (total byte count of valid jpeg data) through a two-wire serial interface. in addition, the jpeg data length and jpeg status byte are always appended at the end of jpeg spoof frame. jpeg status byte can be optionally appended at the end of jpeg continuous frame. jpeg data stream sent to the host does not have a header.
mt9d131_ds rev. j 5/15 en 77 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing figure 10: timing of jpeg compress ed output in free-running clock mode figure 11: timing of jpeg comp ressed output in gated clock mode figure 12: timing of jpeg co mpressed output in spoof mode in the spoof mode, the timing of frame_ valid and line_valid mimics an uncom- pressed output. the timing of pixclk and d out within each line_valid assertion period is variable and therefore unlike that of uncompressed data. valid jpeg data are padded with dummy data to the size of the original uncompressed frame. pixclk frame_valid line_valid d out 0-d out 7 first jpeg byte last jpeg byte status byte pixclk frame_valid line_valid d out 0-d out 7 soi first jpeg byte last jpeg byte eoi frame_valid line_valid line_valid pixclk d out 0-d out 7 j0 = jpeg_data_length [7:0] j1 = jpeg_data_length [15:8] j2 = jpeg_data_length [23:16] s = status byte padded data j0 j1 j2 s
mt9d131_ds rev. j 5/15 en 78 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing color conversion formulas y'cb'cr' itu-r bt.601 a widely known color conversion standard. note that 16 < y 601 < 235 and 16 < cb, cr < 240. 0 < = rgb < = 255. y 601 ' = y'*219/256 + 16 cr' = 0.713 (r' - y')*224/256 + 128 cb' = 0.564 (b' - y')*224/256 + 128 where y' = 0.299 r' + 0.587 g' + 0.114 b' the reverse formulas to convert ycbcr into rgb, 0 < = rgb < = 255: r' = 1.164(y 601 ' - 16) + 1.596(cr' - 128) g' = 1.164(y 601 ' - 16) - 0.813(cr' - 128) - 0.391(cb' - 128) b' = 1.164(y 601 ' - 16) + 2.018(cb' - 128) y'u'v' this conversion is bt 601 scaled to make yuv range from 0 through 255. this setting is recommended for jpeg encoding and is the most popular, although it is not well defined and often misused in windows. y' = 0.299 r' + 0.587 g' + 0.114 b' u' = 0.564 (b' - y') + 128 v' = 0.713 (r' - y') + 128 there is an option where 128 is not added to u'v'. y'cb'cr using srgb formulas the mt9d131 implements the srgb standard. this option provides ycbcr coefficients for a correct 4:2:2 transmission. note that 16 < y60 1< 235, 16 < cb, cr < 240 and 0 < = rgb < = 255. y' = (0.2126*r' + 0.7152*g' + 0.0722*b')*219/256 + 16 cb' = 0.5389*(b '- y')*224/256 + 128 cr' = 0.635*(r' - y')*224/256 + 128
mt9d131_ds rev. j 5/15 en 79 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor output format and timing y'u'v' using srgb formulas similar to the previous set of formulas, bu t has yuv spanning a range of 0 through 255. y' = 0.2126*r' + 0.7152*g' + 0.0722*b' u' = 0.5389*(b' - y') + 128 = -0.1146*r' - 0.3854*g' + 0.5*b' + 128 v' = 0.635*(r' - y') + 128 = 0.5*r' - 0.4542*g' - 0.0458*b' + 128 there is an option to disable adding 128 to u'v'. the reverse transform is as follows: r' = y + 1.5748*v g' = y - 0.1873*(u - 128) - 0.4681*(v - 128) b' = y + 1.8556*(u - 128)
mt9d131_ds rev. j 5/15 en 80 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core sensor core this section describes the sensor core. the core is based entirely on micron?s mt9d011 sensor. the soc firmware controls a key sensor core registers, such as exposure, window size, gains, and contexts. when firmware or mcu are disabled, the sensor core can be programmed directly. introduction the sensor core is a progressive-scan sensor that gene rates a stream of pixel data quali- fied by line_valid and frame_valid signals. an on-chip pll generates the master clock from an input clock of 6 mhz to 40 mhz. in default mode, the data rate (pixel clock) is the same as the master clock freq uency, which means that one pixel is gener- ated every master clock cycle. the sensor block diagram is shown in figure 13. figure 13: sensor core block diagram the core of the sensor is an active-pixel array. the timing and control circuitry sequences through the rows of the array, resetti ng and then reading each row. in the time interval between resetting a row and reading th at row, the pixels in that row integrate incident light. the exposure is controlled by varying the time interval between reset and readout. after a row is read, the data from the columns is sequenced through an analog signal chain (providing offset correction and gain), and then through an adc. the output from the adc is a 10-bit value for each pixel in the array. the pixel array contains optically active and light-shielded ?black? pixels. the black pixels are used to provide data for on-chip offset correction algorithms (black level control). the sensor contains a set of 16-bit control and status registers that can be used to control many aspects of the sensor operatio ns. these registers can be accessed through a two-wire serial interface. in this docume nt, registers are specified either by name (column start) or by register address (r0x04:0) . fields within a register are specified by bit or by bit range (r0x20:0[0] or r0x0b:0[13 : 0]). the control and status registers are described in table 5, ?sensor core register description,? on page 23. the output from the sensor is a bayer pattern : alternate rows are a sequence of either green/red pixels or blue/green pixels. the offset and gain stages of the analog signal chain provide per-color control of the pixel data. active-pixel sensor (aps) array uxga 1600h x 1200v serial i/o data out sync signals control register analog processing adc timing and control
mt9d131_ds rev. j 5/15 en 81 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core pixel array structure the sensor core pixel array is configured as 1,688 columns by 1,256 rows (shown in figure 14). the first 52 columns and the first an d the last 20 rows of pixels are optically black and are used for the automatic black le vel adjustment. the last 4 columns are also optically black. the optically active pixels are used as follows: in default mode a uxga image (1,600 columns by 1,200 rows) is generated, starti ng at row 28, column 60. a 4-pixel boundary of active pixels can be enab led around the image to avoid boundary effects during color interpolation and correction. during mirrored readout, the region of active pixels used to generate the image is offset by 1 pixel in each mirrored direction so that the readout always starts on the same color pixel. figure 14: pixel array the sensor core uses a bayer color pattern, as shown in figure 15. the even-numbered rows contain green and red color pixels; odd-numbered rows contain blue and green color pixels. even-numbered columns contain green and blue color pixels; odd-numbered columns contain red and green color pixels. the color order is preserved during mirrored readout. (1687, 1255) 52 black columns 20 black rows 20 black rows (0,0) 4 black columns oversize uxga 1,632 x 1,216 active pixels
mt9d131_ds rev. j 5/15 en 82 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core figure 15: pixel color pattern detail (top right corner) default readout order by convention, the sensor core pixel array is shown with pixel (0,0) in the top right corner (see figure 15). this reflects the actual layout of the array on the die. when the sensor is imaging, the active surface of the sensor faces the scene as shown in figure 16. when the image is read out of the sensor, it is read one row at a time, with the rows and columns sequenced as shown in figure 14. by convention, data from the sensor is shown with the first pixel read out?pixel (52,20) in the case of the sensor core?in the top left corner. figure 16: imaging a scene raw data format the sensor core image data is read out in a progressive scan. valid image data is surrounded by horizontal blanking and vert ical blanking as shown in figure 17. the amount of horizontal blanking and vertical blanking is programmable. line_valid is high during the shaded region of the figu re. frame_valid timing is described in the next section. black pixels column readout direction . . . ... row readout direction g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b r g2 r g2 r g2 g1 b g1 b g1 b first clear pixel (52,20) lens pixel (0,0) row readout order column readout order scene sensor (rear view)
mt9d131_ds rev. j 5/15 en 83 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core figure 17: spatial illustration of image readout raw data timing the sensor core output data is synchronized with the pixclk output. when line_valid is high, one pixel da tum is output on the 10-bit d out output every pixclk period. by default, the pixclk signal runs at the same fr equency as the master clock, and its rising edges occur one-half of a master clock period after transitions on line_valid, frame_valid, and d out (see figure 18). this allows pixclk to be used as a clock to sample the data. pixclk is contin uously enabled, even during the blanking period. the sensor core can be programmed to delay the pixclk edge relative to the d out transitions from 0 to 3.5 master clocks, in steps of one-half of a master clock. this can be achieved by programming the corresponding bits in r0x0a:0. the parameters p, a, and q in figure 19 are defined in table 19 on page 85. figure 18: pixel data timing example p 0,0 p 0,1 p 0,2 ................................p 0,n-1 p 0,n p 1,0 p 1,1 p 1,2 ................................p 1,n-1 p 1,n 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 p m-1,0 p m-1,1 .........................p m-1,n-1 p m-1,n p m,0 p m,1 .........................p m,n-1 p m,n 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ............. 00 00 00 00 00 00 ..................................... 00 00 00 00 00 00 ..................................... 00 00 00 00 00 00 ................................ 00 00 00 00 00 00 ................................ 00 00 00 valid image horizontal blanking vertical blanking vertical/horizontal blanking p 0 (9:0) p 1 (9:0) p 2 (9:0) p 3 (9:0) p 4 (9:0) p n-1 (9:0) p n (9:0) valid image data blanking blankin g line_valid pixclk d out 0-d out 9
mt9d131_ds rev. j 5/15 en 84 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core figure 19: row timing and frame_valid/line_valid signals the sensor timing is shown in terms of pixel clock and master clock cycles (see figure 18 on page 83). the recommended master clock fr equency is 36 mhz. increasing the inte- gration time to more than one frame causes the frame time to be extended. the equa- tions in table 19 on page 85 assume integration time is less than the number of rows in a frame (r0x09:0 < r0x03:0/s + border + vblank _reg). if this is not the case, the number of integration rows must be used instead to determine the frame time, as shown in table 20 on page 85. frame_valid line_valid number of master clocks paq aqap
mt9d131_ds rev. j 5/15 en 85 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core note: skip factor should be multip lied by 2 if binning is enabled. table 19: frame time parameter name equation default timing at 36 mhz dual adc mode hblank_reg horizontal blanking register r0x07:0 if r0xf2:0[0] = 0 r0x05:0 if r0xf2:0[0] = 1 0x15c = 348 pixels vblank_reg vertical blanking register r0x8:0 if r0xf2:0[1] = 0 r0x6:0 if r0xf2:0[1] = 1 0x20 = 32 rows adc_mode adc mode r0xf2:0[3] = 0: r0x20:0[10] r0xf2:0[3] = 1: r0x21:0[10] pixclk_period pixel clock period adc_mode = 0: r0x0a:0[2:0] adc_mode = 1: r0x0a:0[2:0]*2 1 adc_mode: 55.556ns 2 adc_mode: 27.778ns s skip factor for skip 2x mode: s = 2 for skip 4x mode: s = 4 for skip 8x mode: s = 8 for skip 16x mode: s = 16 otherwise, s = 1 1 aactive data time (r0x04:0/s) * pixclk_period 1,600 pixel clocks = 1,600 master = 44.44 ? s pframe start/end blanking 6 * pixclk_period (can be controlled by r0x1f:0) 6 pixel clocks = 12 master = 0.166 ? s q horizontal blanking hblank_reg * pixclk_period 348 pixel clocks = 348 master = 9.667 ? s a + q row time ((r0x04:0/s) + hblank_reg) * pixclk_period 1,948 pixel clocks = 1,948 master = 54.112 ? s vvertical blanking vblank_reg * (a + q) + (q - 2*p) 62,672 pixel clocks = 62,672 master = 1.741ms nrows * (a + q) frame valid time (r0x03:0/s) * (a + q) - (q - 2*p) 2,337,264 pixel clocks = 2,337,264 master = 64.925ms f total frame time ((r0x03:0/s) + vblank_reg) * (a + q) 2,399,936 pixel clocks = 2,399,936 master = 66.665ms table 20: frame ? long integration time parameter name equation (master clock) v vertical blanking (long integration time) (r0 x09:0 C (r0x03:0)/s) * (a + q) + (q - 2*p) f total frame time (long integration time) (r0x09:0) * (a + q)
mt9d131_ds rev. j 5/15 en 86 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core registers table 5, ?sensor core register description,? on page 23 provides a detailed description of the registers. bit fields that are not identified in the table are read-only. double-buffered registers some sensor settings cannot be changed duri ng frame readout. for example, changing row width r0x03:0 part way through frame re adout results in inconsistent line_valid behavior. to avoid this, the sensor core doub le-buffers many registers by implementing a ?pending? and a ?live? version. reads an d writes access the pending register. the live register controls the sensor operation. the value in the pending register is transferre d to a live register at a fixed point in the frame timing, called ?frame start.? frame star t is defined as the point at which the first dark row is read out. by default, this occurs 10 row times before frame_valid goes high. r0x22:0 enables the dark rows to be show n in the image, but th is has no effect on the position of frame start. to determine which registers or register fi elds are double-buffered in this way, see table 5, ?sensor core register description,? on page 23, the ?sync?d-to-frame-start? column. r0x0d:0[15] can be used to inhibit transfers from the pending to the live registers. this control bit should be used when making many register changes that must take effect simultaneously. bad frames a bad frame is a frame where all rows do no t have the same integration time, or where offsets to the pixel values changed during the frame. many changes to the sensor register settings can cause a bad frame. for example, when row width r0x03:0 is changed, the new regist er value does not affect sensor behavior until the next frame start. however, the frame that would be read out at that frame-start has been integrated using the old row width. consequently, reading it out using the new row width results in a frame with an incorrect integration time. by default, most bad frames are masked: line_valid and frame_valid are inhibited for these frames so that the vertical blanking time between frames is extended by the frame time. to determine which register or register field changes can produce a bad frame, see table 5, ?sensor core register description,? on page 23, the ?bad frame? column, and these notations: ? n?no. changing the register value does not produce a bad frame ? y?yes. changing the register value might produce a bad frame ? ym?yes; but the bad frame is masked out unless the ?show bad frames? feature (r0x0d:0[8]) is enabled changes to integration time if the integration time (r0x09:0) is change d while frame_valid is asserted for frame n ; the first frame output using the new integration time is frame ( n + 2 ). the sequence is as follows: 1. during frame n , the new integration time is held in the r0x09:0 pending register. 2. at the start of frame ( n +1 ), the new integration time is transferred to the r0x09:0 live register.
mt9d131_ds rev. j 5/15 en 87 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor sensor core integration for each row of frame ( n + 1 ) has been completed using the old integration time. the earliest time that a row can start integrating using the new integration time is immediately after that row has been read for frame ( n + 1 ). the actual time that rows start integrating using the new integration time is dependent on the new value of the integration time. if the integration time is changed (r0x09:0 written) on successive frames, each value written is applied to a single frame; the la tency between writing a value and it affecting the frame readout remains at two frames. changes to gain settings when the gain settings (r0x2b:0, r0x2c:0, r0x2d:0, r0x2e:0, and r0x2f:0) are changed, the gain is usually updated on the next fram e start. when the integration time and the gain are changed simultaneously, the gain upda te is held off by one frame so that the first frame output with the new integration ti me also has the new gain applied. all the firmware drivers must be off (that is, seq.cmd = 0) before manual control of gains or inte- gration time (r0x09:0) is possible.
mt9d131_ds rev. j 5/15 en 88 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description feature description pll generated master clock the pll embedded in the sensor core can generate a master clock signal whose frequency is up to 80 mhz (input clock from 6 mhz through 64 mhz). registers r0x66:0 and r0x67:0 control the frequency of the pll-ge nerated clock. it is po ssible to bypass the pll and use extclk as master clock. to do so, one must set r0x65:0[15] to 1. if power consumption is a concern, r0x65:0[14] should be also set to 1 a short time later, to put the bypassed pll in power down mode. to enable the pll again, the two bits must be set to 0 in the reverse order. by default, the pll is bypassed and powered down. pll setup the pll output frequency is determined by three constants (m, n, and p) and the input clock frequency. these three values are set in: r0x66:0// [15:8] for m; [5:0] for n r0x67:0// [6:0] for p their relations can be shown by the following equation: f pll, f out = f pll, f in, x m / [2 x (n+1) x (p+1)] however, since the following requirements must be satisfied, then not all combinations of m/n/p are valid: m must be 16 or higher f pfd, f vco, f out ranges are satisfied after determining the proper m, n, and p values and setting them in r102:0/r103:0, the pll can be enabled by the following sequence: r0x65:0[14] = 0 // powers on pll r0x65:0[15] = 0 // disable pll bypass (enabling pll) note: if pll is used, bypass the pll (r0x65:0[15] = 1) before going into hard standby. it can be enabled again (r0x65:0[15] = 0) on ce the sensor is out of standby. table 21: frequency parameters frequency equation min (mhz) max (mhz) f pfd f in / (n+1) 2 13 f vco f pfd x m 110 240 f out f vco / [2 x (p+1)] 6 80 f in C 6 64
mt9d131_ds rev. j 5/15 en 89 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description pll power-up the pll takes time to power up. during this ti me, the behavior of its output clock signal is not guaranteed. the pll is in the power-do wn mode by default and must be turned on manually. when using the pll, the correct power-up sequence after chip reset is as follows: 1. program pll frequency settings (r0x66:0 and r0x67:0) 2. power up the pll (r0x65:0[14] = 0) 3. wait for a time longer than pll locking time (> 1ms) 4. turn off the pll bypass (r0x65:0[15] = 0) window control window start the row and column start address of the displayed image can be set by r0x01:0 (row start) and r0x02:0 (column start). window size the size of the sensor core image is cont rolled by r0x03:1 (row width) and r0x04:0 (column width). the default image size is 1,600 columns and 1,200 rows (uxga). the window start and size registers can be used to change the number of columns in the image from 17 through 1,632 and the numb er of rows from 2 through 1,216. the displayed image size is controlled by the outp ut and crop variables in the mode (id = 7) driver. pixel border when bits r0x20:0[9:8] are both set, a 4-pi xel border is added around the specified image. this border can be used as extra pixels for image processing algorithms. the border is independent of the readout mode, which means that even in skip, zoom, and binning modes, a 4-pixel border is output in the image. when enabled, the row and column widths are 8 pixels larger than the values programmed in r0x03:0 and r0x04:0. if the border is enabled but not shown in the image (r0x20[9:8] = 01), the horizontal blanking and vertical blanking values are 8 pixels larger than the values programmed in the blanking registers. readout modes readout speeds and power savings the sensor core has two adcs to convert th e pixel values to digital data. because the adcs run at half the master clock frequency, it is possible to achieve a data rate equal to the master clock frequency. by turning off one of the adcs, the power consumption of the sensor is reduced. the pixel clock is then reduced by a factor of two. in r0x20:0 or r0x21:0, bit 10 chooses between the two modes: ? 0: use both adcs and read out at the set pixel clock frequency (r0x0a:0[3:0]) ? 1: use 1 adc and read out at half the set pixel clock freq uency (r0x0a:0[3:0]) this can be used, for instance, when the came ra is in preview mode. to make the transi- tions between two sensor settings easier, some simple context switching is described in ?context switching? on page 94.
mt9d131_ds rev. j 5/15 en 90 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description column mirror image by setting r0x20:0[1] = 1 (r0x21:0 in context a), the readout order of the columns are reversed as shown in figure 20. the starting color is preserved when mirroring the columns. row mirror image by setting r0x20:0[0] = 1 (r0x21:0 in context a), the readout order of the rows are reversed as shown in figure 21. the starting color is preserved when mirroring the rows. figure 20: 6 pixels in normal and column mirror readout modes figure 21: 6 rows in normal and row mirror readout modes column and row skip this section assumes context b. if context a is used, replace all references to r0x20:0 with r0x21:0. by setting r0x20:0[4] = 1 or r0x20:0[7] = 1, skip is enabled for rows or columns, respec- tively. when skip is enabled, the image is su bsampled. the amount of skipping is set by r0x20:0[3:2] (rows) and r0x20:0[6:5] (columns ) according to table 22. depending on the skip value, the output size variable in the mode (id = 7) driver might need adjustments. the number of rows or columns read out is what is set in r0x03:0 or r0x04:0, respec- tively, divided by the skip value in this table. table 22: skip values bit values skip value 00 2 01 4 10 8 11 16 d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) r2 (9:0) d out 0?d out 9 r everse readout r2 (9:0) g3 (9:0) g2 (9:0) r1 (9:0) g1 (9:0) r0 (9:0) d out 0?d out 9 frame_valid normal readout row0 (9:0) row1 (9:0) row2 (9:0) row3 (9:0) row4 (9:0) row5 (9:0) d out 0?d out 9 reverse readout row5 (9:0) row6 (9:0) row4 (9:0) row3 (9:0) row2 (9:0) row1 (9:0)
mt9d131_ds rev. j 5/15 en 91 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description in all cases, the row and column sequencing ensures that the bayer pattern is preserved. column skip examples are shown in figures 22 through 25. figure 22: 8 pixels in normal and column skip 2x readout modes figure 23: 16 pixels in normal and column skip 4x readout modes figure 24: 32 pixels in normal and column skip 8x readout modes d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) g3 (9:0) r3 (9:0) d out 0?d out 9 line_valid column skip readout g0 (9:0) r0 (9:0) g2 (9:0) r2 (9:0) r2 (9:0) d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) g7 (9:0) r7 (9:0) d out 0?d out 9 line_valid column skip readout g0 (9:0) r0 (9:0) g4 (9:0) r4 (9:0) d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) g15 (9:0) r15 (9:0) d out 0?d out 9 line_valid column skip readout g0 (9:0) r0 (9:0) g8 (9:0) r8 (9:0)
mt9d131_ds rev. j 5/15 en 92 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description figure 25: 64 pixels in normal and column skip 16x readout modes digital zoom digital zoom is not used in soc. binning the sensor core supports 2 x 2 binning of 4 pi xels of the same color. this mode can be activated by asserting r0x20:0[15] (r0x21:0 if context a is used). binning is primarily used instead of 2x skip as a way of decimating the picture without losing information. the effect of aliasing in preview mode is eliminated when binning is used instead of just skipping rows and columns. activating binning has a few implications: ? it adds a level of skip, so the picture th at comes out has the same dimensions as a picture read out with the next higher skip setting. ? it increases the minimum hblank and minimum row time requirements (see table 25 and table 26). table 23: row addressing number of adcs binning row addressing (not considering start address) 1 no 0, 1, 2, 3, 4, 5, 6, 7,... 2 no 0, 1, 2, 3, 4, 5, 6, 7,... 1 yes 0/2, 1/3, 4/6, 5/7,... 2 yes 0/2, 1/3, 4/6, 5/7,... table 24: column addressing number of adcs binning column addressing (not considering start address) 1 no 0, 1, 2, 3, 4, 5, 6, 7,... 2 no 0/1, 2/3, 4/5, 6/7,... 1 yes 0/2, 1/3, 4/6, 5/7,... 2 yes 0/1/2/3, 4/5/6/7,... d out 0?d out 9 line_valid normal readout g0 (9:0) r0 (9:0) g1 (9:0) r1 (9:0) g2 (9:0) g31 (9:0) r31 (9:0) d out 0?d out 9 line_valid column skip readout g0 (9:0) r0 (9:0) g16 (9:0) r16 (9:0)
mt9d131_ds rev. j 5/15 en 93 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description binning limitations to achieve correct operation, the following conditions must be met: ? start address must be divisible by four (row and column). ? window size must be divisible by four in both directions, after dividing by zoom factor and skip factor (because they both reduce the effective window size from the sensor?s point of view). example: default row size = 1,200. 8x zoom means the actual window on the sensor is divided by 8, so 8x zoom and binning is not allowed with default window size, because 1,200 / 8 = 150, which is not divisible by 4. ? binning can be seen as an extra level of skip. the combination binning/16x skip is therefore not legal. frame rate control for a given window size, the blanking regi sters (r0x05:0 - r0x08:0) along with the row speed register (r0x0a:0) can be used to set a particular frame rate. the frame timing equations (table 19 and table 20 on page 85) can be rearranged to express the horizontal blanking or vertical blanking values as a function of the frame rate: the hblank_reg value allows the frame rate to be adjusted with a minimum resolu- tion of one pixclk_period multiplied by the total number of rows (displayed plus blanking). when finer resolution is required , r0x0b:0 (extra delay) can be used. r0x0b:0 allows the frame time to be changed in increments of pixel clocks. minimum horizontal blanking the minimum horizontal blanking value is co nstrained by the time used for sampling a row of pixels and the overhead in the ro w readout. this is expressed in table 25. minimum row time requirement the total row time must be sufficient to al low all row operations (readout and shutter operations). the row time is the sum of colu mn width (halved during binning divided by column skip factor) and horizontal blanking, and can therefore be adjusted by program- ming these. table 26 shows minimum row time as a function of mode of operation. hblank_reg = master clock freq / (frame rate* ((r0x03:0/s + border) + vblank_reg)*pixclk_period) - (r0x04:0/s + border) vblank_reg = master clock freq / (frame rate* ((r0x04:0/s + border) + hblank_reg)*pixclk_period) - (r0x03:0/s + border) table 25: minimum horizont al blanking parameters parameter default / 2 adc mode, no binning 1adcmode, no binning 2 adc mode, binning 1adcmode,binning hblank(min) 286 mclks 324 mclks = 162 pixclks 470 mclks 508 mclks = 254 pixclks
mt9d131_ds rev. j 5/15 en 94 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description this is a particularly strict requirement during binning because twice as many row oper- ations are required per row and the column width is halved. context switching when the sensor is in the soc bypass mode, r0xf2:0 is designed to enable easy switching between sensor modes. some key registers and bits in the sensor have two physical register locations, called contexts . bits 0, 1, and 3 of r0xf2:0 control which context register context is currently in use. a ?1? in a bit selects context b, while a ?0? selects context a for this parameter. the select bits can be used in any combination, but by default are set up to allow easy switchin g between preview mode and full resolution mode: the horizontal blanking and ve rtical blanking values for the two contexts are chosen so that row time is preserved between contexts. this ensures that changing contexts does not affect integration time. see table 5, ?sensor core register description,? on page 23 for more information. settings for skip, 1 adc mode, and binning can be set separately for context b and context a using r0x20:0 and r0x21:0, respectively . when these settings are referred to in this document, the register is dependent on what context is set in r0xf2:0. for the default (no bypass) mode, context switching is controlled by the sequencer (id = 1) driver. table 26: minimum row time parameters parameter default / 2 adc mode, no binning 1adcmode, no binning 2 adc mode, binning 1adcmode,binning row_time(min) 473 mclks 488 mclks = 244 pixclks 931 mclks 946 mclks = 473 pixclks pointer_operations 461 mclks 464 mclks 919 mclks 922 mclks context b (default context) r0xf2:0 = 0x000b (context b) r0x05:0 = 0x015c (horizontal blanking, context b) r0x06:0 = 0x0020 (vertical blanking, context b) r0x20:0 = 0x0000 (2 adcs, no column or row skip) description: full resolution uxga (1,600 x 1,200) image at 15 fps context a (alternate context, preview mode) r0xf2:0 = 0x0000 (context a) r0x07:0 = 0x00ae (horizontal blanking, context a) r0x08:0 = 0x0010 (vertical blanking, context a) r0x21:0 = 0x0490 (1 adc, 2x column and row skip) description: half-resolution svga (800 x 600) image at 30 fps
mt9d131_ds rev. j 5/15 en 95 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description integration time integration time is controlled by r0x09:0 (shu tter width in multiples of the row time) and r0x0c:0 (shutter delay, in pixclk_period/2). r0x0c:0 is used to control sub-row inte- gration times and only has a visible effect for small values of r0x09:0. the total integra- tion time, t int, is shown in the equation below: in the equation, the integration overhead corresponds to the delay between the row reset sequence and the row sample (read) sequence. typically, the value of r0x09:0 is limited to the number of rows per frame (which includes vertical blanking rows), so that the frame rate is not affected by the integration time. if r0x09:0 is increased beyond the total number of rows per frame, the sensor adds blanking rows as needed. additionally, t int must be adjusted to avoid banding in the image caused by light flicker. therefore, t int must be a multiple of 1/120 of a second under 60hz flicker, and a multiple of 1/100 of a second under 50hz flicker. maximum shutter delay the shutter delay can be used to reduce the integration time. a programmed value of n reduces the integration time by n master clock periods. the maximum shutter delay is set by the row time and the sample time, as shown in the equation below: if the value in this register exceeds the maximum value given by this equation, the sensor may not generate an image. t int = r0x09:0 * row time - integration overhead - shutter delay where: row time = (r0x04:0/s + border + hblank_reg)*pixclk_period master clock periods (from table on page 85) s = skip factor, multiplied by 2 if binning is enabled overhead time = 260 master clock periods (262 in 1 adc mode) shutter delay = r0x0c:0 * pixclk_period ma ster clock periods (/2 in 1 adc mode) with default settings: t int = (1,232 * (1,600 + 348)) - 260 - 0 = 2,399,676 master clock periods = 66.66ms at 36 mhz maximum shutter delay = (row time - pointer_operations) where: row time = (r0x04:0/s + border + hblank_reg)*pixclk_period master clock periods (from table on page 85) s = skip factor, multiplied by 2 if binning is enabled pointer_operations = see table 26 on page 94. with default settings: maximum shutter delay = (1,600 + 348) - 461 = 1,487 (master clock periods)
mt9d131_ds rev. j 5/15 en 96 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description analog signal path the sensor core features two identical anal og readout channels. a block diagram for one channel is shown in figure 26. the readout ch annel consists of two gain stages (asc1 and asc2), a sample-and-hold (adcsh) stage with black level calibration capability (v offset ), and a 10-bit adc. figure 26: analog readout channel asc1 asc2 adcsh 10-bit (g1) (g2) (g3) adc v1 v2 v3 vpix adc_code 10 v offset v refd +
mt9d131_ds rev. j 5/15 en 97 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description stage-by-stage transfer functions transfer functions proceed stage-by-stage, as follows: where g1, g2, and g3 are the gain settings, v offset is the offset (calibration) voltage, and v refd is the reference voltage of the adc. the ga in setting g3 is applied to the signal but is not applied to v offset . the parameters v refd , g1, g2, g3, and v offset are described next. v refd the v refd parameters are as follows: analog gain settings: g1, g2, g3 the analog gains for green1, blue, red, and green2 pixels (as shown in figure 26 on page 96) are set by registers r0x2b:0, r0x2c:0, r0x2d:0, and r0x2e:0, respectively. gain can also be globally set by r0x2 f:0. the analog gain is set by bits 8:0 of the corresponding register as follows: digital gain is set by bits 11:9 of the same registers. let v pix be the input of the signal path: v pix = pixel output voltage = signal path input voltage, the output voltage of asc 1st stage is: v1 = -1*g1*v pix (1) the output voltage of asc 2nd stage is: v2 = -1*g2*v1 (2) the output voltage of adc sample-and-hold stage is: v3 = 2*g3*v2 - v refd + v offset (3) and the adc output code is: adc output code = 511*(1 + (v3 / vr efd )) (4) from (1) to (4), the adc output code can also be written as: adc code = (1022/v refd )*[g1*g2*g3*v pix + (voffset/(2*g3))] (5) the adc reference voltage v refd i s: v refd = v ref _ hi - v ref _ lo (6) where v ref _ hi = 55.5mv*(r0x41:0[7:4] + 23) (7) using default register values: v ref _ hi = 55.5mv*(13 + 23) = 1.998v and v ref _ lo = 55.5mv*(r0x41:0[3:0] +11) (8) using default register values: v ref _ lo = 55.5mv*(7 +11) = 0.999v so v refd = 55.5mv*(r0x41:0[7:4] - r0x41:0[3:0] + 12) (9) using default register values v refd = 1.998 - 0.999 = 0.999v g1 = bit 7 + 1 (10) g2 = bit 6:0 / 32 (11) g3 = bit 8 + 1 (12)
mt9d131_ds rev. j 5/15 en 98 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor feature description offset voltage: v offset the offset voltage provides a constant offset to the adc to fully utilize the adc input dynamic range. the offset voltages for green1, blue, red, and green2 pixels are manually set by registers r0x61:0, r0x62:0, r0x63:0, and r0x64:0, respectively. the offset voltages also can be automatically set by the black level calibration loop. for a given color, the offset voltage, v offset , is determined by: offset_gain is determined by the 2-bit code from r0x5a:0[1:0], as shown in table 27. these step sizes are not exact; increasing the stage0 adc gain from 2 to 4 decreases the step size significance; decreasing the adc v refd increases the step size significance. recommended gain settings the analog gain circuitry in the sensor core provides signal gains from 1 through 15.875. v offset = 0.50v*offset_gain*offset_sign*offset_code[7:0]/255 (13) where: offset_sign is determined by bit 8 as: if bit 8 = 0, offset_sign = +1 (14) if bit 8 = 1, offset_sign = -1 (15) offset_code is the decimal value of bit<7:0> table 27: offset gain r0x5a:0[1:0] offset_gain 00 offset_gain = 0 (no calibration voltage is applied) 01 offset_gain = 0.25 (1 calibration lsb is equal to 0.5 adc lsb when v refd = 1v) 10 offset_gain = 0.50 (1 calibration lsb is equal to 1 adc lsb when v refd = 1v) 11 offset_gain = 1 (1 calibration lsb is equal to 2 adc lsb when v refd = 1v) table 28: recommended gain settings desired gain recommended gain register setting 1C1.969 0x020C0x03f 2C7.938 0x0a0C0x0ff 8C15.875 0x1c0C0x1ff
mt9d131_ds rev. j 5/15 en 99 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware firmware firmware implements all automatic function ality of the camera, including auto expo- sure, white balance, flicker detection and so on. the firmware consists of drivers, gener- ally one driver for each major control func tion. the firmware runs on a 6811-compatible microcontrolle r with a mathematical coprocessor. overview of architecture bootstrap routine the firmware consists of a bootstrap code, drivers, and a test module. the bootstrap code initializes internal low-level mcu register s, performs a mini-sel f-test, and sets up a 128-bytes deep stack. the main routine is then invoked. drivers firmware applications are organized into driv ers. each driver performs a specific func- tion. each driver has its own data structure with various variables. the user can access the data structure through r0xc6:1 and r0xc8:1 to read or write variables. the access is implemented using hardware direct memory access (dma). drivers are static objects with virtual methods. each driver has an a ssociated data structure and a driver id. to access driver variable, the user must know driv er id and variable offset in the data struc- ture. drivers are static objects with virtual methods. each driver has an associated data struc- ture and a driver id. to access a driver variable, the user must know driver id and vari- able offset in the data structure.
mt9d131_ds rev. j 5/15 en 100 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware figure 27: sequencer driver sequencer driver the sequencer is a finite state machine that controls the operation of main functions and the switching between modes. camera operation is organized as states, such as preview or capture. the sequencer carrie s out a number of programs, such as previewing, preview lock, capture, and so on. the state of the sequencer is indicated in va riable state. to have the sequencer execute a certain program, set the program number in cm d. the host then should monitor state to know when to change resolution and/or capture frames. each state has its configuration (see "firmw are driver variables" on page 56). before executing programs, set up state configurations to customize the program. for example, to capture compressed frames, enable compression in capture state configuration. a typical scenario includes the following: 1. configure mode variables after hardware reset. a. set up sensor image size for preview. b. set up displayed image size. leave preview ch.mode to capture capture standby do standby refresh ifp run enter capture leave capture do preview do capture ch.mode to preview enter preview refresh sensor run do preview init lock do preview do capture lock preview
mt9d131_ds rev. j 5/15 en 101 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware c. set up fifo to smooth data rate. 2. configure preview mode. a. set auto exposure, white balance speed. 3. execute sensor refresh command. 4. run in preview until shut ter button is depressed. a. if the shutter button is depresse d halfway, execute the lock program. i. configure preview state to disable necessary functions to be locked, for example, auto exposure, and white balance. ii. configure previewleave state for fast settling of those functions. iii. execute the lock program. iv. the lock program transits previewleave stat e, perform fast settling, and return to pre- view state, which was configured to freeze (lock). b. if the shutter button is depressed all the way, execute the capture program. i. if already in lock mode, disable previe wleave state and execute capture program. ii. if not in lock state and some settling is required, configure previewleave state for fast settling. iii. execute capture program. the program transitions to previewleave, perform required settling and proceed through mode change to capture. 5. capture a frame. a. preconfigure capture mode variables for correct image size, compression, and select video/still. b. monitor the ?state? variable. when the state is capture, grab the frame(s). optionally, configure capture enter or preview leave to have output blanked. this helps grabbing correct frame for capture. low-light operation a number features are available to improve image quality in low-light conditions: ? increased noise suppression in interpolation ? reduced color saturation ? reduced aperture correction ? increased aperture correction threshold ?y-filter the seq.sharedparams.llmode variable enables individual low-light features. seq.sharedparams.llvirtgain1 and 2 specify ga in thresholds to enable some of these features. values are given by seq.sharedparams.llinterpthresh1/2, llsat1/2, llap- corr1/2, and llapthresh1/22. auto exposure driver the ae driver works to achieve desirable exposure by adjusting sensor core?s integration time, analog, and digital gains. the driver can be configured with respect to desired ae speed, maximum and minimum frame rate, the range of gains, brightness, backlight compensation, and so on. ae driver typically runs in one of these modes. the modes are set in the sequencer driver for each sequencer state. ? fast settling preview?reach target exposure as fast as possible ? continuous preview?a slow-changing mode good for video capture ? evaluative?evaluate current scene an d adjust exposure for still capture
mt9d131_ds rev. j 5/15 en 102 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware some key variables affecting all modes: ?ae.target? ? controls target exposure for all modes. increasing or decreasing this vari- able makes the image brighter or darker ? ae.gate?how accurate ae driv er tracks the target exposure ? ae.weights?specify weights for central and peripheral backlight compensation in preview modes ae driver adjusts exposure by programming sensor gains, r0x2b?r0x2e:0 and r0x41:0, sensor integration time r0x9:0 and r0xc:0 and ifp digital gains r0x4e:2 and r0x6e:1. evaluative auto exposure evaluative ae (eae) selects optimum exposure for scenes where conventional ae does not give good results: ? scenes involving sun ? back light scenes ? strong contrast scenes and so on eae breaks down input image into a 4 x 4 gr id of subwindows and analyzes their expo- sure value (ev) readings. it evaluates brightness and contrast in the image, the scene and adjusts exposure appropriately. variable s ae.mmevzone1/2/3/4 keep programmable thresholds defining brightness classes. variable ae.mmshift ev is used to calibrate ev readings for particular module type. mode driver the mode driver reduces integration effort s by managing most aspects of switching between preview (mode a) and capture (mode b) modes. it remembers vital register values for each image acquisition mode an d uploads these values to the appropriate registers upon each mode switch. in addition to remembering the register data, it also creates preloaded and custom gamma an d contrast tables for each mode. to change the mode driver parameters, upload the new values to the mode driver table (id = 7). upon the next mode change or sequencer refresh (cm_refresh) command, these mode driver values are uplo aded to the appropriate sensor and system registers, and the image processing then reflects the new values (at the beginning of the next frame acquired). to control the output image size, upload the dimensions to the mode driver variables: output width_a, output he ight_a, output width_b and output height_b. the mode driver automatically applies any appropriate downsizing filter to achieve this output image size as well as updating the fifo output size when in jpg bypass (raw) mode. it is important so set up the imager to output an image equal to or larger than the target output image. it is also important for the crop window (crop_left_a/b and crop_right_a/ b) to be equal to or larger than the target output image. to upload a custom gamma table, upload th e values to the appropriate mode driver locations (see table 15, ?driver variables-jpeg driver (id = 9),? on page 72), and select ?3? (user-defined) for the gamma table type for the particular mode. if a contrast level is selected, it is applied to the user-uploaded gamma table.
mt9d131_ds rev. j 5/15 en 103 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware the driver contains settings for raw and ou tput image size and pan for each mode. see variables such as mode.sensor_col_width_a/b, mode.sensor_row_height_a/b and mode.fifo_width_a/b, mode.fifo_height_a/b . blanking and readout mode? the use of skip, binning, and 1adc modes? is configured using sensor core registers r0x5:1?r0x8:1 and r0x20:1, r0x21:1. to change overall image brightness by chan ging adding luma o ffset at output, set ? mode.y_rgb_offset_a for preview ? mode.y_rgb_offset_b for capture to c hang e outp ut fo r ma t, se t ? mode.output_format_a for preview ? mode.output_format_b for capture similarly, the user can set special effects for each mode using mode.spec_effects_a/b. jpeg driver the jpeg driver programs huffman table and quantization table memories, sets up the mt9d131 to output jpeg compressed data, and handles error checking and hand- shaking with the host processor. usage jpeg is enabled using mode.mode_config. for example, to enable compression for capture set mode.mode_congif = 16. jpeg.q scale1/2/3, and specify the quantization factor to control compression ratio. bigg er number indicates more compression. mode.fifo* configure spoof and non-spoof outp ut and specify fifo output clock divider. if necessary, use jpeg.config for error handshaking with the host. table programming at power-up initialization, the jpeg driver loads standard huffman tables into huffman memory. scaled versions of standard luma and chroma quantization tables and are loaded into quantization memory. the calculation of the scaled quantization table is as follows: scaled_q = (scaling_facto r * standard_q + 16) >> 5 scaling factor is bit 6:0 of jpeg driver va riables qscale1, qscale2, and qscale3. the stan- dard quantization and huffman tables are tables k.1?k.4 of the iso/iec 10918-1 speci- fication. host processor can override huffman and quantization memory with any arbitrary huffman and quantization tabl es through indirect register access. if the host chooses to use the scaled standard quantization tables, bit 4 of jpeg driver variable config must be set to ?1.? scaling fa ctor can be changed at any time. whenever it is changed, bit 7 of the corresponding jpeg dr iver variable qscale must be set to ?1,? and the new value takes effect in the next frame jpeg encoding. since the quantization memory stores three sets (with luma and chroma information) of quantization tables, the one that is used fo r the current frame jpeg encoding is indi- cated in bit 7:6 of jpeg.config (quantization table id). bit 5 of jpeg.config determines who is responsible for setting the quantization table id. if it is ?0,? the host processor must program quantization table id for every jpeg compressed frame (no need to
mt9d131_ds rev. j 5/15 en 104 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor firmware reprogram it if subsequent jpeg frames use the same quantization tables). if it is ?1,? the jepg driver sets quantization table id to ?0? at the start of jpeg capture (be it still or video) and automatically select next set of qu antization tables for the subsequent frames when the current jpeg frame is unsuccessful. bit 7:6 of jpeg.config = 0, 1, and 2 indicates fi rst, second, and third set of quantization tables, respectively. error handling and handshaking when the capturing of a jpeg snapshot is un successful, the jpeg driver can be config- ured to enable encoding subsequent frames until it is successful by setting bit 2 of jpeg.config to ?1.? for capturing jpeg video, mt9d131 always encodes subsequent frames no matter what value bit 2 of jpeg.config is set to. if bit 1 of jpeg.config is ?1 ,? handshaking with the host processor at every erroneous jpeg frame is required. when jpeg status regi ster indicates that there is an error in the current jpeg frame, jpeg encoding is stopped until the host processor sets bit 3 of jpeg.config to ?1? to indicate it is ready to receive next jpeg frame. if the host processor does not respond to an erroneous jpeg frame within jpeg.timeoutframes frames, jpeg capture is terminated. if bit 1 of jpeg.config is ?0? or if there is no error in jpeg status register, no handshaking is required. the handshaking mechanism is provided so that the host processor has sufficient time to handle the erroneous jpeg frame and react upon the error condition. for example, if the jpeg status register indicates fifo ov erflow, the host processor should increase quantization value by changing quantization table scaling factor or selecting another set of the preloaded quantization tables. if spoof oversize error occurs, the host processor should increase the spoof frame size by programming registers r0x10 and r0x11 on ifp register page 2 and/or increase quantization value.
mt9d131_ds rev. j 5/15 en 105 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage start-up and usage the start-up sequence consists of the following: 1. power-up 2. hardware reset 3. configure and enable pll 4. configure pad slew rate 5. configure preview mode 6. configure capture mode 7. perform lock or capture to start the part, power up power supplies, provide an input clock, and perform a hard- ware reset. power-up there are no specific requirements to the order in which different supplies are turned on. once the last supply is stable within the valid ranges specified below, follow the hard reset sequence to complete the power-up sequ ence. to minimize leakage current, all the power supplies should be turned on at the same time . power-down before powering down the sensor, it is recommended to bypass the pll. once this is completed, the input clock (extclk) can be turned off. after extclk is off, turn off all the power supplies as shown in figure 28 on page 106. reset_bar should also be low at this time. note: turning the power supplies off cannot be used as a method of achieving low power consumption. power to the sensor needs to be provided as long as the system is active. for the lowest power consumption, refer to the standby procedure. analog voltage: 2.8v for best image performance digital voltage: 1.8v 0.1v (1.7vC1.9v) i/o voltage: 1.7vC3.1v
mt9d131_ds rev. j 5/15 en 106 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage hard reset sequence after power-up, a hard reset is required. assuming all supplies are stable, the assertion of reset_bar (active low) sets the device in reset mode. the clock is required to be active when reset_bar is released. hence, leavin g the input clock running during the reset duration is recommended. after 24 clock cycl es (extclk), the two-wire serial interface is ready to accept commands. reset should not be activated while standby is asserted. a hard reset sequence to the camera can be activated by the following steps: 1. wait for all power supplies to be stable and within specification. 2. supply the sensor with an input clock. 3. assert reset_bar (active low) for at least 1s. 4. de-assert reset_bar (input clock must be running). 5. wait 24 clock cycles before using the two-wire serial interface. refer to figure 28 for the timing diagram. figure 28: power on/off sequence notes: 1. for a safe reset to occur, extclk should be running during reset with standby low, as shown in the sequence above. 2. after reset_bar is high, wait 24 extclk rising edges before the two-wire serial interface commu- nication is initiated. 3. after the power-up sequence, the preview state is reached when the firmware variable seq.state (id = 1, offset = 4) is equal to 3. this transition ti me varies depending on the input clock frequency and scene conditions. 4. to go into the firmware standby state, go to capt ure mode (also known as context b), or execute the firmware refresh/refresh_mode commands after the power-up sequence (the preview state [seq.state = 3] must be reached first). vdd, vddq, vaa, vaapix reset# extclk sclk/sdata (ship) standby 24-extclk inactive inactive power down power up reset (>1 s)
mt9d131_ds rev. j 5/15 en 107 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage soft reset sequence a soft reset to the camera can be ac tivated by the following procedure: 1. bypass the pll, r0x65:0 = 0xa000, if it is currently used 2. perform mcu reset by setting r0xc3:1 = 0x0501 3. enable soft reset by setting r0x0d:0 = 0x0021. bit 0 is us ed for the sensor core reset while bit 5 refers to soc reset. 4. disable soft reset by setting r0x0d:0 = 0x0000 5. wait 24 clock cycles before using the two-wire serial interface note: no access to mt9d131 registers?both page 1 and page 2?is possible during soft reset. enable pll since the input clock frequency is unknown, the part starts with pll disabled. the default mnp values are for 10 mhz, with 80 mh z as target. for other frequencies, calcu- late and program appropriate m, n, and p values. pll programming and power-up sequence is as follows: 1. program pll frequency settings, r0x66?r0x67:0 2. power up pll, r0x65:0[14] = 0 3. wait for pll settling time >150s 4. turn off pll bypass, r0x65:2[15] = 0 allow one complete frame to effect the co rrect integration time after enabling pll. note: until pll is enabled the two-wire serial inte rface may be limited in speed. after pll is enabled, the two-wire serial interface master can increase its communication speed. configure pad slew program the desired slew rate for d out , pixclk, frame_valid, and line_valid at the variables, mode.fifo_conf1/2_a/b. program r0 xa:1 with desired slew rate for two-wire serial interface s data and s clk . configure preview mode the default preview image size is 800 x 600, running at up to 30 fps at 80 mhz internal clock. to change the default size, program mode driver variables mode.output_width_a and mode.output_height_a and issue a refresh command, seq.cmd = 5. for example, to configure 160x120 lcd rgb preview, program ? mode.output_width_a = 160 ? mode.output_width_b = 120 ? mode.out_format_a = 0x20 ?seq.cmd = 5 preview contrast, brightness, gamma, frame rate, and many other parameters can be loaded here as well. if known at this time, the user can also program capture parameters. if necessary, set up the ae/wb lock command here.
mt9d131_ds rev. j 5/15 en 108 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage configure capture mode program the mode and other drivers, when desired capture parameters (video, still, compression, and resolution) are known. perform lock or capture see "sequencer driver" on page 100 for details. standby sequence standby mode can be activated by two methods. the first method is to assert standby, which places the chip into hard standby. turning off the input clock (extclk) reduces the standby power consumption to the maximum specification of 100a at 55 ? c. there is no serial interface ac cess for hard standby. the second method is activate d through the serial interface by setting r0xd:0[2] = 1 to the register, known as the soft standby. as long as the input clock remains on, the chip allows access through the seri al interface in soft standby. standby should only be activated from th e preview mode (context a), and not the capture mode (context b). in addition, the pll state (off/bypassed/activated) is recorded at the time of firmware standby (seq.cmd = 3) and restored once the camera is out of firmware standby. in both hard and soft standby scenarios, internal clocks are turned off and the analog circuitry is put into a low power state. exit from standby must go through the same interface as entry to standby. if the input clock is turned off, the clock must be restarted before leaving standby. if the pll is used to generate the master clock, ensure that the pll is powered down during standby because it uses a relatively high amount of power. by default, r0x65:0[13] powers down the pll when the chip enters standby mode. turn on the pll bypass (r0x65:0[15] = 1) to prepare the pll for standby. to enter standby 1. preparing for standby a. issue the standby command to the firmware by setting seq.cmd = 3 b. poll seq.state until the current state is in standby (seq.state = 9) c. bypass the pll if used by setting r0x65:0[15] = 1 2. preventing additional leakage current during standby a. set r0xa:1[7] = 1 to prevent elevated standby current. it controls the bidirec- tional pads d out , line_valid, frame_valid, and pixclk. b. if the outputs are allowed to be left in an unknown state while in standby, the current can increase. therefore, either have the receiver hold the camera out- puts high or low, or allow the camera to drives its outputs to a known state by setting r0xd:0[6] = 1, r0xd:0[4] needs to remain at the default value of ?0.? in this case, some pads are high while some are low. for dual camera systems, at least one camera has to be driving the bus at any time so that the outputs are not left floating. 3. putting the camera in standby a. assert standby = 1. optionally, stop th e extclk clock to minimize the standby current specified in the mt9d131 data sheet. for soft standby, program standby r0xd:0[2] = 1 instead.
mt9d131_ds rev. j 5/15 en 109 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage to exit standby 1. de-assert standby a. provide extclk clock, if it was disabled when using standby b. de-assert standby = 0 if hard standby was used. or program r0xd:0[2] = 0 if soft standby was used 2. reconfiguring output pads 3. issue a go_preview command to the firmware by setting seq.cmd = 1 4. poll seq.state until the current state is preview (seq.state = 3) the following timing requirements should be met to turn off extclk during hard standby: 1. after asserting standby, wait 1 ro w time before stopping the clock 2. restart the clock 24 clock cycles before de-asserting standby figure 29: hard standby sequence standby hardware configuration while in standby, floating io signals may caus e the standby current to rise significantly. therefore, it is recommended that the following signals be maintained high or low during standby and not floating: d out [7:0], pixclk, frame_valid, and line_valid. output enable control when the sensor is configured to operate in default mode, the d out , frame_valid, line_valid, and pixclk outputs can be placed in high-z under hardware or software control, as shown in table 29 on page 110. power up sequence completed vdd, vddq, vaa, vaapix reset# extclk sclk/sdata (ship) standby when seq.state=3, the sensor is back in active state wait for seq.state=9, then bypass pll and set all the required registers/ variables described assert stdby extclk off extclk on reconfig output pads if necessary, then call seq.cmd=1 wait for seq.state=3, then call seq.cmd=3 de- assert stdby 1 row-time 24-extclk low power state
mt9d131_ds rev. j 5/15 en 110 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage the pin transition between driven and high -z always occurs as ynchronously. output- enable control is provided as a mechanism to allow multiple sensors to share a single set of interface pins with a host controller. there is no benefit in placing the pins in a high-z while the part is in its low-power standby state. therefore, in single-sensor applications that use standby to enter and leave the standby state, programming r0x0d:0[6] = 1 is recommended. contrast and gamma settings the mt9d131 ifp includes a block for gamma and contrast correction. a custom gamma/contrast correction table may be uploaded, or pre-set gamma and contrast settings may be selected. the gamma and contrast correction block uses the following 12-bit input data points to form a piecewise linear tr ansformation curve: 0, 64, 128, 256, 512, 768, 1024, 1280, 1536, 1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840, and 4095. these input points have been selected to provide more detail to the low end of the curve where gamma correc- tion changes are typically the greatest. these points correspond to 8-bit output values that can be uploaded to the appropriat e registers. figure 30: gamma correction curve for simplicity, predefined gamma and cont rast tables may be selected, and the mt9d131 automatically combines these tables and upload them to the appropriate gamma correction registers. table 29: output enable control standby r0x0d:0[4] (output_dis) r0x0d:0[6] (drive_pins) output state 0 0 (default) 0 (default) driven 1 0 (default) 0 (default) high-z dont care 0 (default) 1 driven dont care 1 dont care high-z gamma correction 0 50 100 150 200 250 300 0 1000 2000 3000 4000 input rgb, 12-bit output rgb, 8-bit 0.45
mt9d131_ds rev. j 5/15 en 111 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage the gamma and contrast tables may be selected at mode driver (id = 7) offsets 67 and 68 (decimal) for mode a and mode b, respective ly. the gamma settings are established at bits 0?2, and the contrast setting s are established at bits 4?6. the gamma setting values are shown in table 30. s-curve the predefined contrast table values have been established by creating an "s" curve with highlight and shadow regions that blend smoothly with a linear midtone region. the slope and value of the highlight and shadow regions match the linear region at these transitions. in addition, the slope of the "s " curve is zero at the top (white) and bottom (black) points. the slope of the linear region determines how much contrast is applied; more contrast corresponds to a higher, midtone linear slope. figure 31: contrast s curve the contrast values are shown in table 31 on page 112. table 30: gamma settings gamma setting definition 0 gamma = 1.0 (no gamma correction) 1 gamma = 0.56 2 gamma = 0.45 3 use user-defined gamma table
mt9d131_ds rev. j 5/15 en 112 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage the contrast curve function is applied to the gamma curve points used (whether the gamma curve points are predefined or user-uploaded). s-curve is a function to correct image pixel values. when applied to pixel values, it typi- cally compresses dark and bright tones, wh ile stretching the midtones. figure 32 shows how input tone range is remapped to output to ne range. categorize input pixel values as dark, midlevel, and bright. when no s-curve is applied, pixel values are unchanged. that is, dark tones 0...x 1 map to same dark tones 0...x 1 =y 1 , and midlevel maps to identical midlevel x 1 = x 2 , and bright maps to identical bright. when an s-curve is applied, the mapping is changed. in particular, midtones are stretched (y 1 ? y 2 )>(x 1 ? x 2 ), causing increase of contrast. here (y 1 ? y 2 )/(x 1 ? x 2 ) is a measure of contrast. value of 1 corre- sponds to no change; >1 and <1 indicate co ntrast increase and decrease, respectively. dark tones are compressed, y 1 mt9d131_ds rev. j 5/15 en 113 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage figure 33: contrast diagram auto exposure two types of auto exposure are available?preview and evaluative. preview in preview ae, the driver calculates image brightness based on average luma values received from 16 programmable equal-size re ctangular windows forming a 4 x 4 grid. in preview mode, 16 windows are combined in 2 segments: central and peripheral. central segment includes four central windows. all remaining windows belong to peripheral segment. scene brightness is calculated as average luma in each segment taken with certain weights. variable ae.weights[3:0] spec ifies central zone weig ht, ae.weights[7:4] - peripheral zone weight. the driver changes ae parameters (it, gains, and so on) to drive brightness (ae.currenty) to programmable target (ae.target). value of one step approach to target is defined by ae.jumpdivisor variable. expected brightness is ynew = ae.currenty+(ae.target-ae.currenty)/ ae.jumpdivisor. to avoid unwanted reaction of ae on small fluctuations of scene brightness or momen- tary scene changes, the ae driver uses temporal filter for luma and gate around ae luma target. the driver changes ae parameters only if buffered luma outsteps ae target gates. variable ae.lumabufferspeed defines buffering level. 32*ybuf1 = ybuf0*(32-ae.lumabuffers peed)+ycurr* ae.lumabufferspeed; values ae.lumabufferspeed = 32 and ae.jumpdivisor = 1 specify maximal ae speed. contrast only 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 highlight region linear mid tone region shadow region (x 1 ,y 1 ) (x 2 ,y 2 )
mt9d131_ds rev. j 5/15 en 114 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage evaluative algorithm a scene evaluative ae algorithm is availabl e for use in snapshot mode. the algorithm performs scene analysis and classification wi th respect to its brightness, contrast, and composure and then decides to increase, decrease, or keep original exposure target. it makes most difference for backligh t and bright outdoor conditions. exposure control to achieve the required amount of exposure, the ae driver adjusts the sensor integration time r0x9:0, r0xc:0, gains, adc reference, and if p digital gains. to reject flicker, integra- tion time is typically adjusted in increments of ae.r9_step. ae.r9_step specifies duration in row times equal to one flicker period. thus, flicker is rejected if integration time is kept a natural factor of the flicker period. exposure is adjusted differently de pending on illumination situation. ? in extremely bright conditions, the exposu re is set using r0xc:0, r0x9:0, and analog gains. r0xc:0 is used to achieve very short integration times. in this situation, r0x9:0 = ae., r9_step r0x9:0 is set as a natural factor of ae.r9_step. analog gains are also used, but the green gain, also called virtual gain, does not exceed 2x. ae.minvirtgain limits minimal integration time and is expressed in flicker periods. ae.index indicates the current integration time expressed in the same form. ? under medium-intensity illu mination, the integration time can increase further. for any given exposure, the best signal-to-noise ratio can be typically obtained by using the longest exposure and the smallest gain setting. however, a long exposure time can slow down the output frame rate if the former exceeds the default frame rate, r0x9:0 > r0x3:0 + r0x6:0 + 1. integration ae.indexth23 specifies the breakpoint where ae scheme, giving preference to increasing the shutter width, is replaced with another scheme giving preference to increase in gain. ae.maxgain23 specifies maximum allowed gain in this situation. ae.virtgain indicates current green channel gain. ? in darker situations, the gain achieves ae.maxgain23 and the integration time is allowed to increase again up to ae.maxindex. ? in yet darker situations, once the integrat ion time achieves ae.maxindex, the analog gain is allowed to increase up to ae.maxvirtgain. ? in very dark conditions, the digital ifp gains are allowed to increase up to ae.maxdgainae1 and ae.maxdgainae2. adc is used as an additional gain stage by adjusting reference levels. see ae.adc* vari- ables.
mt9d131_ds rev. j 5/15 en 115 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage figure 34: gain vs. exposure lens correction zones to increase the precision of the correction function, the image plane is divided into 8 zones in each dimension. the coordinates of zone boundaries are referenced with respect to the lens center, c. each boundary as well as c (cx, cy) coordinate is stored as a byte, which represents the coordinate value divided by 4. there are always three bound- aries to the left (top) of the center and three to the right (bottom) of the center. these boundaries apply uniformly for each color channel. however, the correction functions are programmable independently for each color component. boundary and lens center positions are also valid for the preview mode. figure 35 on page 116 illustrates the lens correction zones. ae.r9_step 2x 2 * ae.r9_step 3 * ae.r9_step 4 * ae.r9_step ae.indexth23 1x . . . . ae.maxgain23 . . . ae.maxvirtgain ae.maxdgainae1 / ae.maxdgainae2 (th23 + 1) * ae.r9_step (th23 + 2) * ae.r9_step (th23 + 3) * ae.r9_step (th23 + 4) * ae.r9_step ae.maxindex . . . no gain: integration time & shutter delay (up to 16 lines) increasing exposure time increasing gain normally set to ensure constant frame rate
mt9d131_ds rev. j 5/15 en 116 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage figure 35: lens correction zones lens correction procedure the goal of the lens shading correction is to achieve a constant sensitivity across the entire image area after the correction is applied. to accomplish this, each incoming pixel value is multiplied with a correction function f (x, y), which is dependent on the location of the pixel. the corrected pixel data, p out , can be expressed in the following term: (eq 1) within each zone described above, the correction function can be expressed with a following equation, as follows: (eq 2) where are piecewise quadratic polyno mial functions that are inde- pendent in each x and y dimension, and k and g are constants that can be used to increase lens correction at the image corner s (k) and to offset the lc magnitude for all zones and colors (g). x 0 x 1 x 2 y 1 x 5 x 4 x 3 y 0 y 2 y 5 y 4 y 3 array center c y c x x p out xy ? ?? = p in xy ? ?? * f xy ? ?? f xy ? ?? = ? xx 2 ? ?? ? yy 2 ? ?? + k* ? xx 2 ? ?? * ? xx 2 ? ?? * ? yy 2 ? ?? -g + ? xx 2 ? ?? and ? yy 2 ? ??
mt9d131_ds rev. j 5/15 en 117 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage the expressions are defined independently for each dimension. these can be expressed further as: (eq 3) and (eq 4) to implement the function f (x, y) for each zone, the mt9d131 provides a set of registers that allow flexible definition of the function f (x, y). these registers contain the following parameters: ? operation mode r0x80:2 ? zone boundaries and center offset r0x81:2?r0x87:2 ? initial conditions of: for each color (12-bit wide) r0x88:2?r0x8d:2 ? initial conditions of the first derivative of: for each color (12-bit wide) r0x8e:2?r0x93:2 ?the second derivatives of: ?the second derivatives of for each color and each zone (8-bit wide) r0x94:2?r0xab:2 ? values for k(10-bit wide) and g(8-bit wide) in (2) for all colors and zones are specified in r0xad:2 and r0xae:2. sign fo r k is specified in r0x80:2. there are x2 factor that can be applied to the second derivatives inside each zone (r0xac:2) if correction curvature in the particul ar zone is to be increased. there are also global x2 factors for all zones in x and y dire ction located in r0x80:2. the first derivative (for both x and y directions) can be divided by a number (devisor) specified in r0x80:2 before it is applied to the f function. higher numbers result in more precise curve (full- scale expanse). ? xx 2 ? ?? and ? yy 2 ? ?? ? xx 2 ? ?? = a i x 2 + b i x + c i ? yy 2 ? ?? = d i y 2 + e i y + f i ? xx 2 ? ?? and ? yy 2 ? ?? ? xx 2 ? ?? and ? yy 2 ? ?? ? xx 2 ? ?? and ? yy 2 ? ??
mt9d131_ds rev. j 5/15 en 118 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor start-up and usage color correction color correction in the color pipeline is achieved by: 1. apply digital gain to raw rgb, r0x6a:1?r0x6e:1 2. subtract second black level d from raw rgb, see r0x3b:1 3. multiply result by ccm, r0x60:1?r0x66:1 4. clip the result mcu controls both ccm and d. decimator to fit image size to customer needs, the im age size of the soc can be scaled down. the decimator can reduce image to arbitrary size using filtering. the scale-down procedure is performed by transferring an incoming pixel from the image sp ace into a decimated (scaled down) space. the procedure can be performed in both x and y dimensions. all the standard formats with resolution lower than 2 megapixels as well as customer-speci- fied resolutions are supported. transfer of pixel from the image into the decimated space is done in the following way, which is the same in x and y directions: each incoming pixel is split in two parts. the first part (p1) goes into the currently formed output-space pixel while part two (p2) goes to the next pixel. p1 could be equal or less than value of the incoming pixel while p2 is always less. these two parts are obtained by multiplyin g the value of incoming pixel by scaling factors f1 and f2, which sum is always cons tant for the given decimation degree and proportional to x1/x0 where x1 is size of the output image and x0 is the size of the input image. it is denoted as ?decimation weight.? coefficients f1 and f2 are calculated in the microcontroller transparently for user based on the specified output image si ze and mode of soc operation. at large decimation degrees, several incoming pixels may be averaged into one deci- mated pixel. averaging of the pixels during decimation provides a low pass filter, which removes high-frequency components from the incoming image, and thus avoids aliasing in the decimated space. the decimator has two operational modes?no rmal and high-precision. since the inter- mediate result for y decimated pixels has to be stored in a memory buffer with certain word width, there is a need for additional precision at larger decimation degrees when scaling factors are small. this is done by increasing the number of digits for each stored value when decimation is greater than 2. c 11 c 12 c 13 c 21 c 22 c 23 c 31 c 32 c 33 r raw *g r -d g raw *g g -d b raw *g b -d r g b clip
mt9d131_ds rev. j 5/15 en 119 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor spectral characteristics spectral characteristics figure 36: typical spectral characteristics quantum efficiency 0 5 10 15 20 25 30 35 40 350 450 550 650 750 850 950 1050 wavelength (nm) quantum efficiency (%) blue green red vs. wavelength
mt9d131_ds rev. j 5/15 en 120 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor spectral characteristics figure 37: chief ray angle (cra) vs. image height cra vs. image height plot image height cra (%) (mm) (deg) 000 5 0.140 1.68 10 0.280 3.37 15 0.420 5.03 20 0.560 6.67 25 0.700 8.25 30 0.840 9.79 35 0.980 11.25 40 1.120 12.63 45 1.260 13.92 50 1.400 15.11 55 1.540 16.19 60 1.680 17.15 65 1.820 17.98 70 1.960 18.69 75 2.100 19.26 80 2.240 19.68 85 2.380 19.96 90 2.520 20.08 95 2.660 20.05 100 2.800 19.87 mt9d131 cra design 0 2 4 6 8 10 12 14 16 18 20 22 24 0 10 20 30 40 50 60 70 80 90 100 110 image height (%) cra (deg)
mt9d131_ds rev. j 5/15 en 121 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor spectral characteristics die outline figure 38: optical center offset note: figure not to scale. last clear pixel (col 1683, row 1235) first clear pixel (col 52, row 20) optical center (167.84 m, 2.06 m) die center (0 m, 0 m) 7845.05 m (bare die) 8199.35 m (bare die) pll
mt9d131_ds rev. j 5/15 en 122 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor electrical specifications electrical specifications recommended die operating temperature range is fr om C20 to +55c. the sensor image quality may degrade above +55c. table 32: ac electrical characteristics parameter symbol conditions min type max units input clock frequency f extclk1 pll enabled (mclk max = 80 mhz) 61064mhz input clock period t extclk1 pll enabled (mclk max = 80 mhz) 15.625 100 166.7 ns input clock frequency f extclk2 pll disabled 6 80 mhz input clock period t extclk2 pll disabled 12.5 166.7 ns input clock rise time t r 0.5 1 v/ns input clock fall time t f 0.5 1 v/ns clock duty cycle 405060 % pixclk frequency f pixclk default 6 80 mhz pixclk to data valid t pd default -3 3 ns pixclk to fv high t pfh default -3 3 ns pixclk to lv high t plh default -3 3 ns pixclk to fv low t pfl default -3 3 ns pixclk to lv low t pll default -3 3 ns input pin capacitance c in 3.5 pf load capacitance c load 15 20 pf ac setup conditions f extclk1 664mhz v dd 1.7 1.8 1.95 v v dd q 1.7 2.8 3.1 v v aa 2.5 2.8 3.1 v vaapix 2.5 2.8 3.1 v v dd pll 2.5 2.8 3.1 v output load 15 pf
mt9d131_ds rev. j 5/15 en 123 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor electrical specifications notes: 1. due to the influence of seve ral variables (scene illumination, ou tput load) maximum values are not available. table 33: dc electrical defi nitions and characteristics parameter symbol conditions min typ max units note core digital voltage v dd 1.7 1.8 1.95 v i/o digital voltage v dd q 1.7 2.8 3.1 v analog voltage v aa 2.5 2.8 3.1 v pixel supply voltage vaapix 2.5 2.8 3.1 v pll supply voltage v dd pll 2.5 2.8 3.1 v input high voltage v ih v dd q = 2.8v 2.4 v dd q+0.3 v v dd q = 1.8v 1.4 v dd q+0.3 input low voltage v il v dd q = 2.8v gnd-0.3 0.8 v v dd q = 1.8v gnd-0.3 0.5 input leakage current i in no pull-up resistor; v in = v dd q or d gnd C10 +/-0.5 10 ? a output high voltage v oh at specified i oh v dd qC0.4 v output low voltage v ol at specified i ol 0.4 v output high current i oh at specified v oh = v dd q~400 m v at 1.7v v dd q C7 ma output low current i ol at specified v ol ~400mv at 1.7v v dd q 7ma tri-state output leakage current i o zv in = v dd q or gnd C10 +/-0.5 10 ? a digital operating current i dd 1 context b, 1600 x 1200, jpeg on, mclk = max, pixclk = max 92 110 ma i/o digital operating current i dd q1 context b, 1600 x 1200, jpeg on, mclk = max, pixclk = max 15 ma 1 analog operating current i aa 1 context b, 1600 x 1200, jpeg on, mclk = max, pixclk = max 43 55 ma pixel supply current iaapix1 context b, 1600 x 1200, jpeg on, mclk = max, pixclk = max 2.1 3.5 ma pll supply current iddpll1 context b, 1600 x 1200, jpeg on, mclk = max, pixclk = max 2.3 3 ma digital operating current i dd 2 context a, 800 x 600, no jpeg, mclk = max, pixclk = max 48 60 ma i/o digital operating current i dd q2 context a, 800 x 600, no jpeg, mclk = max, pixclk = max 15 ma 1 analog operating current iaa2 context a, 800 x 600, no jpeg, mclk = max, pixclk = max 27 35 ma pixel supply current iaapix2 context a, 800 x 600, no jpeg, mclk = max, pixclk = max 45.5ma pll supply current iddpll2 context a, 800 x 600, no jpeg, mclk = max, pixclk = max 2.3 3 ma standby current pll enabled istdby1 pll enabled (mclk = 0hz, held at either v il or v ih ) 35 100 ? a standby current pll disabled istdby2 pll disabled (mclk = 0hz, held at v il or v ih ) 35 100 ? a
mt9d131_ds rev. j 5/15 en 124 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor electrical specifications note: 1 stresses above those listed may cause permanent damage to the device. this is a stress rating only, and functional operation of the device at thes e or any other condi- tions above those indicated in the product sp ecification is not implied. exposure to absolute maximum rating conditions for exte nded periods may affect device reliabil- ity. i/o timing figure 39: i/o timing diagram table 34: absolute maximum ratings symbol parameter min max unit v dd digital power C0.3 2.4 v v dd qi/o power C0.34.0v v dd pll pll power C0.3 4.0 v v aa analog power (2.8v) C0.3 4.0 v vaapix pixel array power C0.3 4.0 v v in dc input voltage C0.3 v dd q+0.3 v v out dc output voltage C0.3 v dd q+0.3 v t op operation temperature C30 70 c t stg 1 storage temperature C40 85 c extclk pixclk t r t f t extclk data(7:0) frame valid/ line valid xxx xxx xxx xxx xxx xxx note: frame_valid leads line_valid by 6 pixclks. note: frame_valid trails line_valid by 6 pixclks. t cp t pfl t pll t pd t pd t pfh t plh pxl_0 pxl_1 pxl_2 pxl_n *pll disabled for t cp
mt9d131_ds rev. j 5/15 en 125 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface appendix a: two-wire serial register interface this section describes the two-wire serial in terface bus that can be used in any func- tional sensor mode. the two-wire serial interface bus enables r/ w access to control and status registers within the sensor core. the interface protocol uses a master/slave model in which a master controls one or more slave devices. the sensor acts as a slave device. the master generates a clock (s clk ) that is an input to the sensor and used to synchronize transfers. the master is respon- sible for driving a valid logic level on s clk at all times. data is transferred between the master and the slave on a bidirectional signal (s data ). both the s data and s clk signal are pulled up to v dd off-chip by a 1.5k ? resistor. either the slave or master device can drive the s data line low?the interface protocol determines which device is allowed to drive the s data line at any given time. protocol the two-wire serial interface bus defines the transmission codes as follows: ?a start bit ? the slave device 8-bit address ? a(an) (no) acknowledge bit ? an 8-bit message ?a stop bit sequence a typ ical read or write sequence is executed as follows: 1. the master sends a start bit. 2. the master sends the 8-bit slave device addr ess. the last bit of the address determines if the request is a read or a write, where a ?0? indicates a write and a ?1? indicates a read. 3. the slave device acknowledges receipt of the address by sending an acknowledge bit to the master. 4. if the request is a write, the master then tr ansfers the 8-bit register address, indicating where the write takes place. 5. the slave sends an acknowledge bit, indica ting that the register address has been received. 6. the master then transfers the data, 8 bits at a time, with the slave sending an acknowl- edge bit after each 8 bits. the sensor core uses 16-bit data for its intern al registers, thus requiring two 8-bit trans- fers to write to one register. after 16 bits are transferred, the register address is automati- cally incremented so that the next 16 bits ar e written to the next register address. the master stops writing by sending a start or stop bit. a typical read sequence is executed as follows. 1. the master sends the write-mode slave address and 8-bit register address, just as in the write request. 2. the master then sends a start bit and the read-mode slave address, and clocks out the register data, 8 bits at a time. 3. the master sends an acknowledge bit after each 8-bit transfer. the register address is auto-incremented after ever y 16 bits is transferred. 4. the data transfer is stopped when the master sends a no-acknowledge bit.
mt9d131_ds rev. j 5/15 en 126 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface bus idle state the bus is idle when both the data and clock lines are high. control of the bus is initiated with a start bit, and the bus is released with a stop bit. only the master can generate start and stop bits. start bit the start bit is defined as a high-to-low data line transition while the clock line is high. stop bit the stop bit is defined as a low-to-high data line transition while the clock line is high. slave address the 8-bit address of a two-wire serial interfac e device consists of 7 bits of address and 1 bit of direction. a ?0? in the lsb (least si gnificant bit) of the address indicates write mode, and a ?1? indicates read mode. the de fault slave addresses used by the sensor core are 0xba (write address) and 0xbb (read address). r0x0d:0[10] or the s addr pin can be used to select the alternate slave addresses 0x90 (write address) and 0x91 (read address). writes to r0x0d:0[10] are inhibited when th e standby signal is asserted (all other writes proceed normally). this allows two sensors to co-exist as slaves on this interface, but they must be addressed independently. enable this capability as follows: after reset, both sensors use the default slav e address. reads or writes on the serial register interface to the default slave address are decoded by both sensors simultane- ously. 1. after reset, assert the standby signal to one sensor and negate the standby signal to the other sensor. 2. perform a write to r0x0d:0 with bit 10 set. the sensor with standby asserted ignores the write to bit 10 and continues to decode at the default slave address. the sensor with standby negated has its r0x0 d:0[10] set and responds to the alternate slave address for all subsequent read an d write operations, as shown in table 35. data bit transfer one data bit is transferred during each clock pulse. the serial interface clock pulse is provided by the master. the data must be stable during the high period of the two-wire serial interface clock?it can only change wh en the serial clock is low. data is trans- ferred 8 bits at a time, foll owed by an acknowledge bit. table 35: slave address options s addr r0xd:0[10] slave address write read 0 0 0x090 0x091 0 1 0x0ba 0x0bb 1 0 0x0ba 0x0bb 1 1 0x090 0x091
mt9d131_ds rev. j 5/15 en 127 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface acknowledge bit the master generates the acknowledge clock pu lse. the transmitter (which is the master when writing, or the slave when reading) re leases the data line, and the receiver indi- cates an acknowledge bit by pulling the data line low during the acknowledge clock pulse. no-acknowledge bit the no-acknowledge bit is generated when the data line is not pulled down by the receiver during the acknowledge clock pulse. a no-acknowledge bit is used to terminate a read sequence. page register the mt9d131 two-wire serial interface and it s associated protocols support an address space of 256 16-bit locations. this address sp ace is extended by a 3-bit page prefix, and controlled through accesses to r0xf0:0. the paging mechanism is intended to allow access to other sets of registers when the sensor is embedded as part of a more comple x integrated subsystem, for example, in an soc. all registers within the sensor core are accessible on page 0 (the default page). sample write and read sequences 16-bit write sequence a typical write sequence for writing 16 bits to a register is shown in figure 40. a start bit given by the master starts the sequence, followed by the write address. the image sensor then sends an acknowledge bit and expects the register address to come first, followed by the 16-bit data. after each 8-bit transfer, the image sensor sends an acknowledge bit. all 16 bits must be written before the register is updated. after 16 bits are transferred, the register address is automatically incremented so that the next 16 bits are written to the next register. the master stops writ ing by sending a start or stop bit. figure 40: write timing to r0x09:0value 0x0284 16-bit read sequence a typical read sequence is shown in figure 41 on page 128. first the master writes the register address, as in a write sequence. then a start bit and the read address specify that a read is about to happen from the register. the master clocks out the register data, eight bits at a time. the master sends an acknowled ge bit after each 8-bit transfer. the register address should be incremented after every 16 bits is transferred. the data transfer is stopped when the master sends a no-acknowledge bit. sclk s data 0xba address start sto p ack ack ack ack r0x09 0000 0010 1000 0100
mt9d131_ds rev. j 5/15 en 128 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface figure 41: read timing from r0x09:0; returned value 0x0284 8-bit write sequence to be able to write 1 byte at a time to the re gister, a special register address is added. the 8-bit write is done by writing the upper 8 bi ts to the desired register, then writing the lower 8 bits to the special register address (r0xf1:0). the register is not updated until all 16 bits have been written. it is not possible to update just half of a register. in figure 42, a typical sequence for 8-bit writes is shown. the second byte is written to the special register (r0xf1:0). figure 42: write timing to r0x09:0value 0x0284 8-bit read sequence to read one byte at a time, the same special register address is used for the lower byte. the upper 8 bits are read from the desired register. by following this with a read from the special register (r0xf1:0), the lower 8 bits are accessed (figure 43 on page 129). the master sets the no-acknowledge bits. sclk s data 0xba address start start stop ack ack ack ack nack r0x09 0xbb address 0000 0010 1000 0100 sclk s data 0xba address 0xba address r0xf1 1000 0100 start start stop ack ack ack ack ack ack r0x09 0000 0010
mt9d131_ds rev. j 5/15 en 129 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface figure 43: read timing from r0x09:0; returned value 0x0284 figure 44: two-wire serial bus timing parameters notes: 1. read waveforms start after a write command and register address are issued. they are for an 8-bit read. s clk s data 0xba address start start ack ack ack nack r0x09 0xbb address 0000 0010 s clk s data 0xba address start start stop ack ack ack nack r0xf1 0xbb address 1000 0100 ? ? ? ? t srth t sclk write start write address bit 7 ack register address 7 register value bit 0 stop read start ack write address bit 0 read address bit 7 read address bit 0 register value bit 7 register value bit 0 t sds t sdh t shaw t ahsw t stps t stph t shar t ahsr t sdhr t sdsr sclk sdata sclk sdata read sequence write sequence bit
mt9d131_ds rev. j 5/15 en 130 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor appendix a: two-wire serial register interface table 36: two-wire seri al bus characteristics note: either the slave or master device can drive the s clk line lowthe interface protocol determines which device is allowed to drive the s clk line at any given time. parameter symbol conditions min typ max units serial interface input clock frequency f sclk f extclk/16 khz serial interface input clock period t sclk 1/ f sclk ns s clk duty cycle 40 50 60 % start hold time t srth write/read 4* t extclk ns s data hold t sdh write 4* t extclk ns s data setup t sds write 4* t extclk ns s data hold to ack t shaw write 4* t extclk ns ack hold to s data t ahsw write 4* t extclk ns stop setup time t stps write/read 4* t extclk ns stop hold time t stph write/read 4* t extclk ns s data hold to ack t shar read 4* t extclk ns ack hold to s data t ahsr read 4* t extclk ns s data hold t sdhr read 4* t extclk ns s data setup t sdsr read 4* t extclk ns serial interface input pin capacitance c in _ si 3.5 pf s data max load capacitance c load _ sd 15 pf s data pull-up resistor r sd 1.5 k ?
mt9d131_ds rev. j 5/15 en 131 ?semiconductor components industries, llc,2015. mt9d131: 1/3.2-inch 2-mp soc digital image sensor package dimensions package dimensions figure 45: 48-pin clcc package outline drawing 1.02 typ 1 48 11.22 11.22 5.61 6.6 6.03 7.11 2.16 0.20 1.02 typ 48x 0.51 0.05 13.6 0.1 ctr 13.6 0.1 ctr 7.11 14.22 14.22 5.61 6.6 optical area maximum rotation of optical area relative to package edges: 1o maximum tilt of optical area relative to seating plane a : 50 microns relative to top of cover glass d : 100 microns seating plane 2.3 0.2 a d lid material: borosilicate glass 0.55 thickness wall material: alumina ceramic substrate material: alumina ceramic 0.7 thickness a 0.90 for reference only 1.400 0.125 0.35 for reference only 0.10 a 0.05 image sensor die: 0.675 thickness note: 1. optical center = package center. first clear pixel h ctr ?0.20 a b c v ctr ?0.20 a b c optical center 1 47x 1.02 0.20 0.2 4x lead finish: au plating, 0.50 microns minimum thickness over ni plating, 1.27 microns minimum thickness c b 48x r0.19 1.7
on semiconductor and the on logo are registered trademarks of semiconductor components industries, llc (scillc) or its subsidia ries in the united states and/or other countries. scillc owns the rights to a number of patents, trademarks, copyrights, trade secrets, and other intellectual property. a listing of scillcs pr oduct/patent coverage may be accessed at www.onsemi.com/site/pdf/ patent-marking.pdf. scillc reserves the right to make changes without further noti ce to any products herein. scillc makes no warranty, representat ion or guarantee regarding the suitability of its products for any particular purpose, nor does scillc assume any liability arising out of the application or use of any product or circuit, and specifically disclaim s any and all liability, including without limitation special, consequential or incidental damages. typical parameters which may be provided in scillc data shee ts and/or specifications can and do vary in different applications and actual performance may vary over time. all operating parameters, including typicals must be validated for each customer a pplication by customers technical experts. scillc does not convey any license under its patent rights nor the rights of others. sc illc products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in whic h the failure of the scillc prod uct could create a situation where personal injury or death may occur. should buyer purchase or use scillc products for any such uninte nded or unauthorized applicatio n, buyer shall indemnify and hol d scillc and its officers, employ ees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly o r indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that scillc was negligent regarding the design or manufacture of the part. scillc is an equal opportunity/affirmative action employer. this literature is subject to a ll applicable copyright laws and is not for resale in any manner. mt9d131: 1/3.2-inch 2-mp soc digital image sensor revision history mt9d131_ds rev. j 5/15 en 132 ?semiconductor components industries, llc,2015 . revision history rev. j. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/4/15 ? updated ?ordering information? on page 2 rev. h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3/26/15 ? converted to on semiconductor template rev. g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8/13/12 ? removed icsp package information be cause it is no longer supported. rev. f. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5/11 ? updated trademarks ? updated to new aptina template rev. e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8/10 ? updated to non-confidential rev. d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4/10 ? updated to aptina template rev. c, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .09/07 ? updated table 9, ?drivers ids,? on page 56 ? updated table 11, ?driver variables-auto exposure driver (id = 2),? on page 61 ? added table 12, ?driver variables-auto white balance (id = 3),? on page 63 ? added table 13, ?driver variables-flicker detection driver (id = 4),? on page 66 ? updated table 14, ?driver variables-mode/context driver (id = 7),? on page 68 ? updated table 32, ?ac electrical characteristics,? on page 122 ? updated table 2, ?available part numbers,? on page 2 ? added ?architecture overview,? on page 10 ? added figure 37: ?chief ray angle (cra) vs. image height,? on page 120 ? added figure 47: ?64-ball icsp package outline drawing,? on page 130 rev. b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2/07 ? figure 36 on page 119, spectr al characteristics updated. ? minor changes to table 5 on page 23, table 32 on page 122, and table 33 on page 123. ? updated register references to r0x hexadecimal format. ? updated package from llcc to clcc (see figure 45 on page 131). rev. a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7/06 ?initial release


▲Up To Search▲   

 
Price & Availability of MT9D131C12STC-DR

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X